dbt-sugar
dbt-sugar copied to clipboard
Resolve SQLAlchemy deprecation warnings
The following warnings have been popping up and are pretty easy to fix:
/Users/bastienboutonnet/repos/dbt-sugar/dbt_sugar/core/connectors/postgres_connector.py:31: SADeprecationWarning: Calling URL() directly is deprecated and will be disabled in a future release. The public constructor for URL is now the URL.create() method.
self.connection_url = sqlalchemy.engine.url.URL(
tests/postgres_test.py::test_get_columns_from_table
/Users/bastienboutonnet/repos/dbt-sugar/dbt_sugar/core/connectors/base.py:47: SADeprecationWarning: The from_engine() method on Inspector is deprecated and will be removed in a future release. Please use the sqlalchemy.inspect() function on an Engine or Connection in order to acquire an Inspector. (deprecated since: 1.4)
inspector = sqlalchemy.engine.reflection.Inspector.from_engine(self.engine)
-- Docs: https://docs.pytest.org/en/stable/warnings.html