Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit c58cb81

Browse files
author
Sergey Vasilyev
committed
Remove now-unused runtime mixin loading
They were used only in tests, and only as long as sqeleon was separate from data_diff. As soon as it is one library, it makes no sense to support the runtime mixin loading, this can be done via class definitions.
1 parent d45aae5 commit c58cb81

File tree

3 files changed

+0
-49
lines changed

3 files changed

+0
-49
lines changed

data_diff/sqeleton/databases/_connect.py

-5
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ def for_databases(self, *dbs) -> Self:
105105
database_by_scheme = {k: db for k, db in self.database_by_scheme.items() if k in dbs}
106106
return type(self)(database_by_scheme)
107107

108-
def load_mixins(self, *abstract_mixins: AbstractMixin) -> Self:
109-
"Extend all the databases with a list of mixins that implement the given abstract mixins."
110-
database_by_scheme = {k: db.load_mixins(*abstract_mixins) for k, db in self.database_by_scheme.items()}
111-
return type(self)(database_by_scheme)
112-
113108
def connect_to_uri(self, db_uri: str, thread_count: Optional[int] = 1, **kwargs) -> Database:
114109
"""Connect to the given database uri
115110

data_diff/sqeleton/databases/base.py

-8
Original file line numberDiff line numberDiff line change
@@ -551,14 +551,6 @@ def list_tables(self, tables_like, schema=None):
551551
def table(self, *path, **kw):
552552
return bound_table(self, path, **kw)
553553

554-
@classmethod
555-
def load_mixins(cls, *abstract_mixins) -> type:
556-
class _DatabaseWithMixins(cls):
557-
dialect = cls.dialect.load_mixins(*abstract_mixins)
558-
559-
_DatabaseWithMixins.__name__ = cls.__name__
560-
return _DatabaseWithMixins
561-
562554

563555
class ThreadedDatabase(Database):
564556
"""Access the database through singleton threads.

tests/test_mixins.py

-36
This file was deleted.

0 commit comments

Comments
 (0)