Skip to content

Commit

Permalink
Remove SQLAlchemy deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Jun 6, 2024
1 parent 74f03d7 commit 6d641a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion tests_metricflow/fixtures/setup_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def check_sql_engine_snapshot_marker(request: FixtureRequest) -> None:
@pytest.fixture(scope="session")
def mf_test_configuration( # noqa: D103
request: FixtureRequest,
disable_sql_alchemy_deprecation_warning: None,
source_table_snapshot_repository: SqlTableSnapshotRepository,
) -> MetricFlowTestConfiguration:
engine_url = os.environ.get("MF_SQL_ENGINE_URL")
Expand Down
9 changes: 0 additions & 9 deletions tests_metricflow/fixtures/sql_client_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from typing import Generator

import pytest
import sqlalchemy
import sqlalchemy.util
from _pytest.fixtures import FixtureRequest
from dbt.adapters.factory import get_adapter_by_type
from dbt.cli.main import dbtRunner
Expand Down Expand Up @@ -257,10 +255,3 @@ def warn_user_about_slow_tests_without_parallelism( # noqa: D103
f'Consider using the pytest-xdist option "-n <number of workers>" to parallelize execution and speed '
f"up the session."
)


@pytest.fixture(scope="session", autouse=True)
def disable_sql_alchemy_deprecation_warning() -> None:
"""Since MF is tied to using SQLAlchemy 1.x.x due to the Snowflake connector, silence 2.0 deprecation warnings."""
# Seeing 'error: Module has no attribute "SILENCE_UBER_WARNING"' in the type checker, but this seems to work.
sqlalchemy.util.deprecations.SILENCE_UBER_WARNING = True # type:ignore

0 comments on commit 6d641a6

Please sign in to comment.