Skip to content

Commit 6826728

Browse files
authored
PYTHON-1189: Add Python 3.8 support (scylladb#37)
Add Python 3.8 support
1 parent 4fca34b commit 6826728

File tree

9 files changed

+31
-13
lines changed

9 files changed

+31
-13
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Features
1313
* Flexible version parsing (PYTHON-1174)
1414
* Support NULL in collection deserializer (PYTHON-1123)
1515
* Avoid warnings about unspecified load balancing policy when connecting to a cloud cluster (PYTHON-1177)
16+
* Add Python 3.8 support (PYTHON-1189)
1617
* [GRAPH] Ability to execute Fluent Graph queries asynchronously (PYTHON-1129)
1718
1819
Bug Fixes

README-dev.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,18 @@ An EAP release is only uploaded on a private server and it is not published on p
234234
python setup.py doc
235235

236236
* Upload the docs on the EAP download server.
237+
238+
Adding a New Python Runtime Support
239+
===================================
240+
241+
* Add the new python version to our jenkins image:
242+
https://github.com/riptano/openstack-jenkins-drivers/
243+
244+
* Add the new python version in job-creator:
245+
https://github.com/riptano/job-creator/
246+
247+
* Run the tests and ensure they all pass
248+
* also test all event loops
249+
250+
* Update the wheels building repo to support that version:
251+
https://github.com/riptano/python-dse-driver-wheels

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DataStax Python Driver for Apache Cassandra and DataStax products
77
A modern, `feature-rich <https://github.com/datastax/python-driver#features>`_ and highly-tunable Python client library for Apache Cassandra (2.1+) and
88
DataStax Enterprise (4.7+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3.
99

10-
The driver supports Python 2.7, 3.4, 3.5, 3.6 and 3.7.
10+
The driver supports Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8.
1111

1212
**Note:** DataStax products do not support big-endian systems.
1313

build.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schedules:
88
EVENT_LOOP_MANAGER='libev'
99
matrix:
1010
exclude:
11-
- python: [3.4, 3.6, 3.7]
11+
- python: [3.4, 3.6, 3.7, 3.8]
1212
- cassandra: ['2.1', '3.0', 'test-dse']
1313

1414
commit_long_test:
@@ -20,7 +20,7 @@ schedules:
2020
EVENT_LOOP_MANAGER='libev'
2121
matrix:
2222
exclude:
23-
- python: [3.4, 3.6, 3.7]
23+
- python: [3.4, 3.6, 3.7, 3.8]
2424
- cassandra: ['2.1', '3.0', 'test-dse']
2525

2626
commit_branches:
@@ -33,7 +33,7 @@ schedules:
3333
EXCLUDE_LONG=1
3434
matrix:
3535
exclude:
36-
- python: [3.4, 3.6, 3.7]
36+
- python: [3.4, 3.6, 3.7, 3.8]
3737
- cassandra: ['2.1', '3.0', 'test-dse']
3838

3939
commit_branches_dev:
@@ -46,7 +46,7 @@ schedules:
4646
EXCLUDE_LONG=1
4747
matrix:
4848
exclude:
49-
- python: [2.7, 3.4, 3.7]
49+
- python: [2.7, 3.4, 3.7, 3.8]
5050
- cassandra: ['2.0', '2.1', '2.2', '3.0', 'test-dse', dse-4.8', 'dse-5.0']
5151

5252
release_test:
@@ -138,7 +138,7 @@ schedules:
138138
JUST_UPGRADE=True
139139
matrix:
140140
exclude:
141-
- python: [3.4, 3.6, 3.7]
141+
- python: [3.4, 3.6, 3.7, 3.8]
142142
- cassandra: ['2.0', '2.1', '2.2', '3.0', 'test-dse']
143143

144144
# TODO: Temporary, don't merge me
@@ -152,14 +152,15 @@ schedules:
152152
EXCLUDE_LONG=1
153153
matrix:
154154
exclude:
155-
- python: [3.4, 3.6, 3.7]
155+
- python: [3.4, 3.6, 3.7, 3.8]
156156

157157
python:
158158
- 2.7
159159
- 3.4
160160
- 3.5
161161
- 3.6
162162
- 3.7
163+
- 3.8
163164

164165
os:
165166
- ubuntu/bionic64/python-driver

cassandra/cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ def _create_thread_pool_executor(self, **kwargs):
13521352
Create a ThreadPoolExecutor for the cluster. In most cases, the built-in
13531353
`concurrent.futures.ThreadPoolExecutor` is used.
13541354
1355-
Python 3.7 and Eventlet cause the `concurrent.futures.ThreadPoolExecutor`
1355+
Python 3.7+ and Eventlet cause the `concurrent.futures.ThreadPoolExecutor`
13561356
to hang indefinitely. In that case, the user needs to have the `futurist`
13571357
package so we can use the `futurist.GreenThreadPoolExecutor` class instead.
13581358
@@ -1375,7 +1375,7 @@ def _create_thread_pool_executor(self, **kwargs):
13751375
except ImportError:
13761376
# futurist is not available
13771377
raise ImportError(
1378-
("Python 3.7 and Eventlet cause the `concurrent.futures.ThreadPoolExecutor` "
1378+
("Python 3.7+ and Eventlet cause the `concurrent.futures.ThreadPoolExecutor` "
13791379
"to hang indefinitely. If you want to use the Eventlet reactor, you "
13801380
"need to install the `futurist` package to allow the driver to use "
13811381
"the GreenThreadPoolExecutor. See https://github.com/eventlet/eventlet/issues/508 "

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Python client driver for `Apache Cassandra <http://cassandra.apache.org>`_ and
44
DataStax products. This driver works exclusively with the Cassandra Query Language v3 (CQL3)
55
and Cassandra's native protocol. Cassandra 2.1+ is supported, including DSE 4.7+.
66

7-
The driver supports Python 2.7, 3.4, 3.5, 3.6 and 3.7.
7+
The driver supports Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8.
88

99
This driver is open source under the
1010
`Apache v2 License <http://www.apache.org/licenses/LICENSE-2.0.html>`_.

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Installation
33

44
Supported Platforms
55
-------------------
6-
Python 2.7, 3.4, 3.5, 3.6 and 3.7 are supported. Both CPython (the standard Python
6+
Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8 are supported. Both CPython (the standard Python
77
implementation) and `PyPy <http://pypy.org>`_ are supported and tested.
88

99
Linux, OSX, and Windows are supported.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ def run_setup(extensions):
447447
'Programming Language :: Python :: 3.5',
448448
'Programming Language :: Python :: 3.6',
449449
'Programming Language :: Python :: 3.7',
450+
'Programming Language :: Python :: 3.8',
450451
'Programming Language :: Python :: Implementation :: CPython',
451452
'Programming Language :: Python :: Implementation :: PyPy',
452453
'Topic :: Software Development :: Libraries :: Python Modules'

tests/unit/advanced/test_insights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ def test_token_aware_policy(self):
230230

231231
def test_whitelist_round_robin_policy(self):
232232
self.assertEqual(
233-
insights_registry.serialize(WhiteListRoundRobinPolicy(['123.123'])),
233+
insights_registry.serialize(WhiteListRoundRobinPolicy(['127.0.0.3'])),
234234
{'namespace': 'cassandra.policies',
235-
'options': {'allowed_hosts': ('123.123',)},
235+
'options': {'allowed_hosts': ('127.0.0.3',)},
236236
'type': 'WhiteListRoundRobinPolicy'}
237237
)
238238

0 commit comments

Comments
 (0)