Masson
Masson
More traceback: ``` cls = , connection = , url = None, dialect_name = None dialect = None, environment_context = None, dialect_opts = {}, opts = {} @classmethod def configure(...
So, my fixtures: ``` import pytest from pytest_alembic.config import Config from pytest_mock_resources import create_postgres_fixture @pytest.fixture def alembic_config(): """Override this fixture to configure the exact alembic context setup required. """ return...
> you should be able to use `async_=True`, we have a test for that: https://github.com/schireson/pytest-alembic/blob/main/examples/test_async_sqlalchemy_native/conftest.py > > I wouldn't expect you to need to set the `sqlalchemy.url` config_option, as `alembic_engine`...
> the `if connectable is None:` branch of your `env.py` should be being skipped because pytest-alembic ought to be setting the `connectable` for you, by subbing in the result of...
I has done fully prohibited change. I edited package pytest_mock_resources and changed in function create_postgres_fixture decorator for inner function _async from @pytest.fixture to @pytest_async.fixture. And now, it works fine, but...
Приложите, пожалуйста, полный traceback
Временное решение. Оберните вызов метода new в try except, ловите ошибку и в случае ее возникновения вызывайте update.
> А вообще в качестве первичного ключа разумно использовать telegram _user_id_ пользователя? Нет, user ID это информация, приходящая от телеграмма, вы не можете ей доверять на 100%
> > Нет, user ID это информация, приходящая от телеграмма, вы не можете ей доверять на 100% > > Тогда _merge_ наверное стоит заменить на _add_ в моем случае? Например,...
Мое личное мнение, что решение, которое предлагает @cyborg728, можно считать одним из лучших, но в то же время, метод merge не должен вести себя так как ведет в настоящем ищью....