Skip to content

Commit

Permalink
Add python 3.7 support
Browse files Browse the repository at this point in the history
Add Python 3.7 to the tests. Note that Travis requires a workaround for
now.

Document 3.7 support on PyPi.
  • Loading branch information
jeffwidman committed Oct 27, 2018
1 parent f00016e commit af1c32f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ python:
- 3.4
- 3.5
- 3.6
# - 3.7 # TODO uncomment once Travis supports 3.7 w/o the `matrix` workaround used below
- pypy

# TODO: workaround pulled from:
# https://github.com/travis-ci/travis-ci/issues/9815#issue-336465122
# It only runs a single 3.7 test job against one version of Kafka but
# that's good enough for now since we test all the other permutations,
# especially since this workaround should be removed in the near future.
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
matrix:
include:
- python: 3.7
dist: xenial
sudo: true

env:
- KAFKA_VERSION=0.8.2.2
- KAFKA_VERSION=0.9.0.1
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ servers/$(KAFKA_VERSION)/kafka-bin:
build-integration: servers/$(KAFKA_VERSION)/kafka-bin

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

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

.PHONY: all test36 test27 test-local cov-local clean doc
.PHONY: all test37 test27 test-local cov-local clean doc
2 changes: 1 addition & 1 deletion docs/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Compatibility
kafka-python is compatible with (and tested against) broker versions 1.0
through 0.8.0 . kafka-python is not compatible with the 0.8.2-beta release.

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

Builds and tests via Travis-CI. See https://travis-ci.org/dpkp/kafka-python
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def run(cls):
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
]
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{26,27,34,35,36,py}, docs
envlist = py{26,27,34,35,36,37,py}, docs

[pytest]
testpaths = kafka test
Expand All @@ -11,8 +11,8 @@ log_format = %(created)f %(filename)-23s %(threadName)s %(message)s
deps =
pytest
pytest-cov
py{27,34,35,36,py}: pylint
py{27,34,35,36,py}: pytest-pylint
py{27,34,35,36,37,py}: pylint
py{27,34,35,36,37,py}: pytest-pylint
pytest-mock
mock
python-snappy
Expand Down

0 comments on commit af1c32f

Please sign in to comment.