Skip to content

Commit

Permalink
chore: use weakref.proxy to avoid circular referencing
Browse files Browse the repository at this point in the history
  • Loading branch information
ncclementi committed Aug 22, 2024
1 parent b515edb commit 30a2344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ibis/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _ipython_key_completions_(self) -> list[str]:
class DDLAccessor:
"""ddl accessor list views."""

def __init__(self, backend: BaseBackend):
def __init__(self, backend: weakref.proxy):
self._backend = backend

def _raise_if_not_implemented(self, method_name: str):
Expand Down Expand Up @@ -1053,7 +1053,7 @@ def tables(self):
@functools.cached_property
def ddl(self):
"""A ddl accessor."""
return DDLAccessor(self)
return DDLAccessor(weakref.proxy(self))

@property
@abc.abstractmethod
Expand Down

0 comments on commit 30a2344

Please sign in to comment.