Skip to content

Commit 6a9ad38

Browse files
committed
Upgrade SQLAlchemy dependency to 1.3.17
1 parent 5b572a3 commit 6a9ad38

7 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
sqla-version: ['1.1.15', '1.2.18']
17+
sqla-version: ['1.1.15', '1.2.18', '1.3.17']
1818
python-version: [3.5, 3.6, 3.7, 3.8]
1919

2020
steps:

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changes for crate
55
Unreleased
66
==========
77

8+
- Upgraded SQLAlchemy support to 1.3.
9+
810
- Added ``backoff_factor`` in connection to configure retry interval.
911

1012
- Added official Python 3.8 support.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def read(path):
6969
extras_require=dict(
7070
test=['zope.testing',
7171
'zc.customdoctests>=1.0.1'],
72-
sqlalchemy=['sqlalchemy>=1.0,<1.3']
72+
sqlalchemy=['sqlalchemy>=1.0,<1.4']
7373
),
7474
python_requires='>=3.4',
7575
install_requires=requirements,

src/crate/client/doctests/sqlalchemy.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,11 @@ To search on multiple columns you have to pass a dictionary with columns
242242
and ``boost`` attached. ``boost`` is a factor that increases the
243243
relevance of a column in respect to the other columns::
244244

245+
>>> from sqlalchemy.sql import text
245246
>>> session.query(Character.name) \
246247
... .filter(match({Character.name_ft: 1.5, Character.quote_ft: 0.1},
247248
... 'Arthur')) \
248-
... .order_by(sa.desc('_score')) \
249+
... .order_by(sa.desc(text('_score'))) \
249250
... .all()
250251
[('Arthur Dent',), ('Tricia McMillan',)]
251252

src/crate/client/sqlalchemy/tests/compiler_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from crate.client.sqlalchemy.compiler import crate_before_execute
2525

2626
import sqlalchemy as sa
27-
from sqlalchemy.sql import update
27+
from sqlalchemy.sql import update, text
2828

2929
from crate.client.sqlalchemy.types import Craty
3030

@@ -39,7 +39,7 @@ def setUp(self):
3939
sa.Column('name', sa.String),
4040
sa.Column('data', Craty))
4141

42-
self.update = update(self.mytable, 'where name=:name')
42+
self.update = update(self.mytable, text('where name=:name'))
4343
self.values = [{'name': 'crate'}]
4444
self.values = (self.values, )
4545

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{py,34,35,36,37,38}-sa_{1_0,1_1,1_2}
2+
envlist = py{py,34,35,36,37,38}-sa_{1_0,1_1,1_2,1_3}
33

44
[testenv]
55
usedevelop = True
@@ -11,6 +11,7 @@ deps =
1111
sa_1_0: sqlalchemy>=1.0,<1.1
1212
sa_1_1: sqlalchemy>=1.1,<1.2
1313
sa_1_2: sqlalchemy>=1.2,<1.3
14+
sa_1_3: sqlalchemy>=1.3,<1.4
1415
mock
1516
urllib3
1617
commands =

versions.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Jinja2 = 2.7.3
99
MarkupSafe = 0.23
1010
Pygments = 1.6
1111
Sphinx = 1.2.3
12-
SQLAlchemy = 1.2.0
12+
SQLAlchemy = 1.3.17
1313
coverage = 5.0.3
1414
crate-docs-theme = 0.5.0
1515
createcoverage = 1.5

0 commit comments

Comments
 (0)