Skip to content

Commit 5cb7f91

Browse files
committed
Add support for weak reference on SQL objects
1 parent 0aa03d7 commit 5cb7f91

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Add support for weak reference on SQL objects
12
* Add support for Python 3.13
23

34
Version 1.5.2 - 2024-09-30

sql/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def format2numeric(query, params):
182182

183183

184184
class Query(object):
185-
__slots__ = ()
185+
__slots__ = ('__weakref__',)
186186

187187
@property
188188
def params(self):
@@ -243,7 +243,7 @@ def _with_params(self):
243243

244244

245245
class FromItem(object):
246-
__slots__ = ()
246+
__slots__ = ('__weakref__',)
247247

248248
@property
249249
def alias(self):
@@ -1615,7 +1615,7 @@ def params(self):
16151615

16161616

16171617
class Expression(object):
1618-
__slots__ = ()
1618+
__slots__ = ('__weakref__',)
16191619

16201620
def __str__(self):
16211621
raise NotImplementedError
@@ -1986,7 +1986,8 @@ class Cube(Rollup):
19861986

19871987
class Window(object):
19881988
__slots__ = (
1989-
'_partition', '_order_by', '_frame', '_start', '_end', '_exclude')
1989+
'_partition', '_order_by', '_frame', '_start', '_end', '_exclude',
1990+
'__weakref__')
19901991

19911992
def __init__(self, partition, order_by=None,
19921993
frame=None, start=None, end=0, exclude=None):

0 commit comments

Comments
 (0)