Skip to content

Commit a9fa27f

Browse files
committed
Add python 3.8 support
1 parent 68333e9 commit a9fa27f

File tree

9 files changed

+24
-20
lines changed

9 files changed

+24
-20
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
os: [ubuntu-latest]
1313
sqla-version: ['1.1.15', '1.2.18']
14-
python-version: [3.5, 3.6, 3.7]
14+
python-version: [3.5, 3.6, 3.7, 3.8]
1515

1616
steps:
1717
- uses: actions/checkout@master

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+
- Added official Python 3.8 support.
9+
810
- Made it so that the SQLAlchemy dialect is now aware of the return type of the
911
``date_trunc`` function.
1012

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
universal = 1
33

44
[flake8]
5-
ignore = E501,C901
5+
ignore = E501,C901, W504

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def read(path):
8585
'Programming Language :: Python :: 3.5',
8686
'Programming Language :: Python :: 3.6',
8787
'Programming Language :: Python :: 3.7',
88+
'Programming Language :: Python :: 3.8',
8889
'Programming Language :: Python :: Implementation :: CPython',
8990
'Programming Language :: Python :: Implementation :: PyPy',
9091
'Topic :: Database'

src/crate/client/sqlalchemy/dialect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def get_columns(self, connection, table_name, schema=None, **kw):
246246
query,
247247
[table_name,
248248
schema or self.default_schema_name,
249-
"(.*)\[\'(.*)\'\]"] # regex to filter subscript
249+
r"(.*)\[\'(.*)\'\]"] # regex to filter subscript
250250
)
251251
return [self._create_column_info(row) for row in cursor.fetchall()]
252252

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ def setUp(self):
4444
self.metadata = sa.MetaData()
4545

4646
class User(Base):
47-
__tablename__ = 'users'
47+
__tablename__ = 'users'
4848

49-
name = sa.Column(sa.String, primary_key=True)
50-
friends = sa.Column(sa.ARRAY(sa.String))
51-
scores = sa.Column(sa.ARRAY(sa.Integer))
49+
name = sa.Column(sa.String, primary_key=True)
50+
friends = sa.Column(sa.ARRAY(sa.String))
51+
scores = sa.Column(sa.ARRAY(sa.Integer))
5252

5353
self.User = User
5454
self.session = Session()
5555

5656
def assertSQL(self, expected_str, actual_expr):
57-
self.assertEqual(expected_str, str(actual_expr).replace('\n', ''))
57+
self.assertEqual(expected_str, str(actual_expr).replace('\n', ''))
5858

5959
def test_create_with_array(self):
6060
t1 = sa.Table('t', self.metadata,

src/crate/testing/tests.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ def setUp(test):
5656

5757
def test_suite():
5858
suite = unittest.TestSuite()
59-
s = doctest.DocFileSuite('doctests/layer.txt',
60-
setUp=setUp,
61-
optionflags=doctest.NORMALIZE_WHITESPACE |
62-
doctest.ELLIPSIS,
63-
encoding='utf-8')
59+
s = doctest.DocFileSuite(
60+
'doctests/layer.txt',
61+
setUp=setUp,
62+
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
63+
encoding='utf-8'
64+
)
6465
suite.addTest(s)
6566
suite.addTest(unittest.makeSuite(LayerUtilsTest))
6667
return suite

tox.ini

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

44
[testenv]
55
usedevelop = True

versions.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[versions]
22
crate_server = 4.0.2
33

4-
flake8 = 2.5.1
5-
mccabe = 0.3.1
6-
pep8 = 1.5.7
7-
pyflakes = 1.0.0
4+
flake8 = 3.7.9
5+
mccabe = 0.6.1
6+
pep8 = 1.7.1
7+
pyflakes = 2.1.1
88
Jinja2 = 2.7.3
99
MarkupSafe = 0.23
1010
Pygments = 1.6
1111
Sphinx = 1.2.3
1212
SQLAlchemy = 1.2.0
13-
coverage = 3.7.1
13+
coverage = 5.0.3
1414
crate-docs-theme = 0.5.0
15-
createcoverage = 1.2
15+
createcoverage = 1.5
1616
docutils = 0.12
1717
hexagonit.recipe.download = 1.7
1818
py = 1.4.26

0 commit comments

Comments
 (0)