Skip to content

Commit 2804f7e

Browse files
authored
Merge branch 'master' into feat/container_ttl
2 parents 696e51e + 4e32e4d commit 2804f7e

File tree

5 files changed

+34
-58
lines changed

5 files changed

+34
-58
lines changed

.travis.yml

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: false
1+
os: linux
22
dist: xenial
33
addons:
44
apt:
@@ -11,57 +11,33 @@ cache:
1111
directories:
1212
- zookeeper
1313
language: python
14-
python:
15-
- '2.7'
16-
matrix:
17-
exclude:
18-
- python: '2.7'
14+
jobs:
1915
include:
20-
- python: '2.7'
21-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py27
22-
- python: '2.7'
23-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py27
24-
- python: '2.7'
25-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py27-gevent
26-
- python: '2.7'
27-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py27-gevent
28-
- python: '2.7'
29-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py27-eventlet
30-
- python: '2.7'
31-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py27-eventlet
3216
- python: '3.7'
33-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37
17+
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-gevent-eventlet-sasl,codecov
3418
- python: '3.7'
35-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-sasl
36-
- python: '3.7'
37-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37
38-
- python: '3.7'
39-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-sasl
40-
- python: '3.8'
41-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38
42-
- python: '3.8'
43-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38-sasl
19+
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-gevent-eventlet-sasl,codecov
4420
- python: '3.8'
45-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38 DEPLOY=true
21+
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py38-gevent-eventlet-sasl,codecov
4622
- python: '3.8'
47-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38-sasl
48-
- python: pypy
49-
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy
50-
- python: 'pypy'
51-
env: ZOOKEEPER_VERSION=3.5.7 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy
23+
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py38-gevent-eventlet-sasl,codecov DEPLOY=true
24+
- python: 'pypy3'
25+
env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy3-gevent-eventlet-sasl,codecov
26+
- python: 'pypy3'
27+
env: ZOOKEEPER_VERSION=3.5.8 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy3-gevent-eventlet-sasl,codecov
5228
notifications:
5329
email: false
5430
install:
5531
- pip install tox
5632
script:
57-
- make test
33+
- tox -e ${TOX_VENV}
5834
deploy:
5935
provider: pypi
60-
user: bbangert
36+
username: bbangert
6137
password:
6238
secure: L9yXZ2PhQ2wJKQkgigIzW3f/a3ajzUamMdThVelcp/NZeTJfzlC/t89lfSRwLh95o9Z/aIxC4T8yZvNrRzzyMEP0O6s1F69pVm5Px+KBuv82lmI7p5sKTYPp35CE9jH+K/52Fy0+Az5F502xLrkaO4VLLA+zhLffw/qyvNbZui0=
6339
on:
6440
tags: true
6541
condition: $DEPLOY = true
6642
distributions: release
67-
skip_upload_docs: true
43+
upload_docs: false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ HERE = $(shell pwd)
22
BIN = $(HERE)/bin
33
PYTHON = $(BIN)/python
44
INSTALL = $(BIN)/pip install
5-
TOX_VENV ?= py27
5+
TOX_VENV ?= py37
66
BUILD_DIRS = bin build include lib lib64 man share
77

88
PYTHON_EXE = $(shell [ -f $(PYTHON) ] && echo $(PYTHON) || echo python)

kazoo/handlers/threading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def select(self, *args, **kwargs):
178178
# anything to minimize changes
179179
if _HAS_EPOLL:
180180
# if the highest fd we've seen is > 1023
181-
if max(map(_to_fileno, chain(*args[:3]))) > 1023:
181+
if max(map(_to_fileno, chain.from_iterable(args[:3]))) > 1023:
182182
return self._epoll_select(*args, **kwargs)
183183
return self._select(*args, **kwargs)
184184

requirements_test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ mock
33
objgraph
44
pytest
55
pytest-cov
6+
pytest-xdist

tox.ini

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,21 @@ minversion = 3.6
33
skipsdist = True
44
envlist =
55
pep8,
6-
py27,
7-
py27-{gevent,eventlet,sasl},
8-
py34,
9-
py34-sasl,
10-
py35,
11-
py35-sasl,
12-
py36,
13-
py36-{sasl,docs},
14-
py37,
15-
py37-{gevent,eventlet,sasl,docs},
16-
pypy
17-
18-
[testenv:pep8]
19-
commands = flake8 {posargs}
6+
{py27,py34,py35,py36,py37,py38,pypy3}
7+
{gevent,eventlet,sasl,docs},
8+
pypy3
209

2110
[testenv]
2211
usedevelop = True
2312
install_command = pip install {opts} {packages}
13+
passenv =
14+
CI
15+
TOX_*
16+
TRAVIS
17+
TRAVIS_*
18+
ZOOKEEPER_*
2419
setenv =
2520
VIRTUAL_ENV={envdir}
26-
ZOOKEEPER_VERSION={env:ZOOKEEPER_VERSION:}
27-
ZOOKEEPER_PREFIX={env:ZOOKEEPER_PREFIX:}
28-
ZOOKEEPER_SUFFIX={env:ZOOKEEPER_SUFFIX:}
29-
ZOOKEEPER_LIB={env:ZOOKEEPER_LIB:}
3021
deps =
3122
-c{toxinidir}/constraints.txt
3223
-r{toxinidir}/requirements.txt
@@ -36,10 +27,18 @@ deps =
3627
eventlet: -r{toxinidir}/requirements_eventlet.txt
3728
sasl: -r{toxinidir}/requirements_sasl.txt
3829
sasl: kerberos
30+
codecov: codecov
3931
commands =
4032
sasl: {toxinidir}/init_krb5.sh {envtmpdir}/kerberos \
4133
/{toxinidir}/ensure-zookeeper-env.sh \
42-
pytest {posargs: -ra -v --cov=kazoo kazoo/tests}
34+
pytest {posargs: -ra -v --cov-report=xml --cov=kazoo kazoo/tests}
35+
36+
[testenv:codecov]
37+
commands = - codecov -e TOX_VENV,ZOOKEEPER_VERSION
38+
39+
[testenv:pep8]
40+
commands = flake8 {posargs}
41+
4342

4443
[flake8]
4544
builtins = _

0 commit comments

Comments
 (0)