Skip to content

Commit d96a45b

Browse files
committed
Add python 3.7 support
Add Python 3.7 to the tests. Note that Travis requires a workaround for now. Document 3.7 support on PyPi.
1 parent 8791f05 commit d96a45b

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,21 @@ python:
55
- 3.4
66
- 3.5
77
- 3.6
8+
# - 3.7 # TODO uncomment once Travis supports 3.7 w/o the `matrix` workaround used below
89
- pypy
910

11+
# TODO: workaround pulled from:
12+
# https://github.com/travis-ci/travis-ci/issues/9815#issue-336465122
13+
# It only runs a single 3.7 test job against one version of Kafka but
14+
# that's good enough for now since we test all the other permutations,
15+
# especially since this workaround should be removed in the near future.
16+
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
17+
matrix:
18+
include:
19+
- python: 3.7
20+
dist: xenial
21+
sudo: true
22+
1023
env:
1124
- KAFKA_VERSION=0.8.2.2
1225
- KAFKA_VERSION=0.9.0.1

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ servers/$(KAFKA_VERSION)/kafka-bin:
1414
build-integration: servers/$(KAFKA_VERSION)/kafka-bin
1515

1616
# Test and produce coverage using tox. This is the same as is run on Travis
17-
test36: build-integration
18-
KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) tox -e py36 -- $(FLAGS)
17+
test37: build-integration
18+
KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) tox -e py37 -- $(FLAGS)
1919

2020
test27: build-integration
2121
KAFKA_VERSION=$(KAFKA_VERSION) SCALA_VERSION=$(SCALA_VERSION) tox -e py27 -- $(FLAGS)
@@ -56,4 +56,4 @@ doc:
5656
make -C docs html
5757
@echo "open file://`pwd`/docs/_build/html/index.html"
5858

59-
.PHONY: all test36 test27 test-local cov-local clean doc
59+
.PHONY: all test37 test27 test-local cov-local clean doc

docs/compatibility.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ Compatibility
99
kafka-python is compatible with (and tested against) broker versions 1.0
1010
through 0.8.0 . kafka-python is not compatible with the 0.8.2-beta release.
1111

12-
kafka-python is tested on python 2.7, 3.4, 3.5, 3.6 and pypy.
12+
kafka-python is tested on python 2.7, 3.4, 3.5, 3.6, 3.7 and pypy.
1313

1414
Builds and tests via Travis-CI. See https://travis-ci.org/dpkp/kafka-python

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def run(cls):
5757
"Programming Language :: Python :: 3.4",
5858
"Programming Language :: Python :: 3.5",
5959
"Programming Language :: Python :: 3.6",
60+
"Programming Language :: Python :: 3.7",
6061
"Programming Language :: Python :: Implementation :: PyPy",
6162
"Topic :: Software Development :: Libraries :: Python Modules",
6263
]

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{26,27,34,35,36,py}, docs
2+
envlist = py{26,27,34,35,36,37,py}, docs
33

44
[pytest]
55
testpaths = kafka test
@@ -11,8 +11,8 @@ log_format = %(created)f %(filename)-23s %(threadName)s %(message)s
1111
deps =
1212
pytest
1313
pytest-cov
14-
py{27,34,35,36,py}: pylint
15-
py{27,34,35,36,py}: pytest-pylint
14+
py{27,34,35,36,37,py}: pylint
15+
py{27,34,35,36,37,py}: pytest-pylint
1616
pytest-mock
1717
mock
1818
python-snappy

0 commit comments

Comments
 (0)