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

Commit 818fedb

Browse files
authored
Merge pull request #709 from datafold/remove-runtime-mixins
Remove sqeleton's runtime mixins (used only in tests)
2 parents 39588d9 + c58cb81 commit 818fedb

9 files changed

Lines changed: 1 addition & 211 deletions

File tree

data_diff/sqeleton/databases/_connect.py

Lines changed: 0 additions & 5 deletions
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

Lines changed: 0 additions & 8 deletions
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/sqeleton/__init__.py

Whitespace-only changes.

tests/sqeleton/common.py

Lines changed: 0 additions & 160 deletions
This file was deleted.

tests/sqeleton/test_mixins.py

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
from data_diff.sqeleton import connect
88
from data_diff.sqeleton import databases as dbs
99
from data_diff.sqeleton.queries import table, current_timestamp, NormalizeAsString
10-
from tests.common import TEST_MYSQL_CONN_STRING
11-
from tests.sqeleton.common import str_to_checksum, test_each_database_in_list, get_conn, random_table_suffix
10+
from tests.common import TEST_MYSQL_CONN_STRING, test_each_database_in_list, get_conn, str_to_checksum, random_table_suffix
1211
from data_diff.sqeleton.abcs.database_types import TimestampTZ
1312

1413
TEST_DATABASES = {

0 commit comments

Comments
 (0)