mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-08-02 11:10:11 +03:00
fix: May cause exception when deepcopy queryset(CookieJar)
This commit is contained in:
parent
b62c08747f
commit
5ecb3e75eb
|
@ -20,7 +20,7 @@ dependencies = [
|
|||
"iso8601 >= 0.1.12",
|
||||
"setuptools"
|
||||
]
|
||||
version = "0.0.4"
|
||||
version = "0.0.5"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
|
|
@ -109,7 +109,7 @@ class Database(object):
|
|||
self.db_url = db_url
|
||||
self.readonly = False
|
||||
self.timeout = timeout
|
||||
self.request_session = httpx.Client(verify=verify_ssl_cert)
|
||||
self.request_session = httpx.Client(verify=verify_ssl_cert, timeout=timeout)
|
||||
if username:
|
||||
self.request_session.auth = (username, password or '')
|
||||
self.log_statements = log_statements
|
||||
|
|
|
@ -328,6 +328,21 @@ class QuerySet(object):
|
|||
self._distinct = False
|
||||
self._final = False
|
||||
|
||||
def __deepcopy__(self, memodict={}):
|
||||
obj = type(self)(self._model_cls, self._database)
|
||||
obj._order_by = deepcopy(self._order_by)
|
||||
obj._where_q = deepcopy(self._where_q)
|
||||
obj._prewhere_q = deepcopy(self._prewhere_q)
|
||||
obj._grouping_fields = deepcopy(self._grouping_fields)
|
||||
obj._grouping_with_totals = deepcopy(self._grouping_with_totals)
|
||||
obj._fields = deepcopy(self._fields)
|
||||
obj._limits = deepcopy(self._limits)
|
||||
obj._limit_by = deepcopy(self._limit_by)
|
||||
obj._limit_by_fields = deepcopy(self._limit_by_fields)
|
||||
obj._distinct = deepcopy(self._distinct)
|
||||
obj._final = deepcopy(self._final)
|
||||
return obj
|
||||
|
||||
def __iter__(self):
|
||||
"""
|
||||
Iterates over the model instances matching this queryset
|
||||
|
|
Loading…
Reference in New Issue
Block a user