Skip to content

Commit 512466a

Browse files
committed
#None: use timeout option only for SQLite databases
1 parent 60155f6 commit 512466a

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

RELEASE_NOTES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ error radius smaller than 1.5 arcmin or new area is more than 75% of the older o
161161
plans will be created.
162162
- Fixed type hint for `GladeCatalog.lazy_load_catalog`.
163163

164+
## 0.4.17
165+
166+
- Use timeout option only for SQLite databases
167+
164168

165169
# v0.3.0
166170

aware/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = (0, 4, 16)
1+
__version__ = (0, 4, 17)
22
__strversion__ = "{}.{}.{}".format(__version__)

aware/sql/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def create_session(
195195
query = dict(zip(keys, vals))
196196

197197
url = _create_url(driver, database, user, passwd, host, port, query)
198-
options = dict(url=url, future=True, connect_args=dict(timeout=10))
198+
options = dict(url=url, future=True)
199199

200200
# if "sqlite" in driver and passwd:
201201
# engine = create_engine(url, module=sqlcipher3, future=True)
@@ -204,6 +204,9 @@ def create_session(
204204
if "sqlite" in driver and passwd:
205205
options.update(dict(module=sqlcipher3))
206206

207+
if "sqlite" in driver:
208+
options.update(connect_args=dict(timeout=10))
209+
207210
engine = create_engine(**options)
208211

209212
session_factory = sessionmaker(bind=engine, future=True, expire_on_commit=False)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "AWARE"
7-
version = "0.4.16"
7+
version = "0.4.17"
88
authors = [{name="Nicolai Pankov", email="colinsergesen@gmail.com"}]
99
requires-python = ">=3.9,<3.12"
1010
dependencies = [

0 commit comments

Comments
 (0)