summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen SORRIAUX <stephen.sorriaux@gmail.com>2019-10-09 20:04:16 +0200
committerGitHub <noreply@github.com>2019-10-09 20:04:16 +0200
commitc293aabf39676b94006cf736f9f75392637b8292 (patch)
tree0ec07ec92773b8c15cfebfd6b664c00cbb1858b0
parent961b2f3be557f8314ab41f75444125222638f9cc (diff)
downloadkazoo-c293aabf39676b94006cf736f9f75392637b8292.tar.gz
feat(CI): Keep only Python 3.{6,7} to CI and bump ZK versions to latests (#574)
* Switching to xenial distrib to make python 3.7 available * Testing against 3.5.5 instead of 3.5.4-beta and deploying new version for python 3.7 and zk 3.5.5 * Testing against zk 3.4.14 instead of 3.4.13 * Change pattern for slf4j-log4j lib * Since ZOOKEEPER-3156 it is now required to be authed to access ACLs * Drop support for ZK 3.3.x and Python 3.{4,5}
-rw-r--r--.travis.yml55
-rwxr-xr-xensure-zookeeper-env.sh9
-rw-r--r--kazoo/testing/common.py2
-rw-r--r--kazoo/tests/test_client.py10
-rw-r--r--setup.py1
-rw-r--r--tox.ini5
6 files changed, 42 insertions, 40 deletions
diff --git a/.travis.yml b/.travis.yml
index 799c8de..aa98e5d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
sudo: false
+dist: xenial
addons:
apt:
packages:
@@ -15,51 +16,37 @@ matrix:
- python: '2.7'
include:
- python: '2.7'
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=py27
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py27
- python: '2.7'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py27
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py27
- python: '2.7'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py27
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py27-gevent
- python: '2.7'
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=py27-gevent
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py27-gevent
- python: '2.7'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py27-gevent
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py27-eventlet
- python: '2.7'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py27-gevent
- - python: '2.7'
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=py27-eventlet
- - python: '2.7'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py27-eventlet
- - python: '2.7'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py27-eventlet
- - python: '3.4'
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=py34
- - python: '3.4'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py34
- - python: '3.4'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py34
- - python: '3.5'
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=py35
- - python: '3.5'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py35
- - python: '3.5'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py35
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py27-eventlet
- python: '3.6'
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=py36
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py36
- python: '3.6'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py36 DEPLOY=true
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py36-sasl
- python: '3.6'
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=py36-sasl
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py36
- python: '3.6'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py36
- - python: '3.6'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=py36-sasl
- - python: pypy
- env: ZOOKEEPER_VERSION=3.3.6 TOX_VENV=pypy
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py36-sasl
+ - python: '3.7'
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37
+ - python: '3.7'
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=py37-sasl
+ - python: '3.7'
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37 DEPLOY=true
+ - python: '3.7'
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=py37-sasl
- python: pypy
- env: ZOOKEEPER_VERSION=3.4.13 TOX_VENV=pypy
+ env: ZOOKEEPER_VERSION=3.4.14 TOX_VENV=pypy
- python: 'pypy'
- env: ZOOKEEPER_VERSION=3.5.4-beta TOX_VENV=pypy
+ env: ZOOKEEPER_VERSION=3.5.5 ZOOKEEPER_PREFIX="apache-" ZOOKEEPER_SUFFIX="-bin" ZOOKEEPER_LIB="lib" TOX_VENV=pypy
notifications:
email: false
install:
diff --git a/ensure-zookeeper-env.sh b/ensure-zookeeper-env.sh
index 1a98c3b..7d6063e 100755
--- a/ensure-zookeeper-env.sh
+++ b/ensure-zookeeper-env.sh
@@ -6,14 +6,16 @@ HERE=`pwd`
ZOO_BASE_DIR="$HERE/zookeeper"
ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.4.10}
ZOOKEEPER_PATH="$ZOO_BASE_DIR/$ZOOKEEPER_VERSION"
+ZOOKEEPER_PREFIX=${ZOOKEEPER_PREFIX}
+ZOOKEEPER_SUFFIX=${ZOOKEEPER_SUFFIX}
ZOO_MIRROR_URL="http://archive.apache.org/dist"
function download_zookeeper(){
mkdir -p $ZOO_BASE_DIR
cd $ZOO_BASE_DIR
- curl --silent -C - $ZOO_MIRROR_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/zookeeper-$ZOOKEEPER_VERSION.tar.gz | tar -zx
- mv zookeeper-$ZOOKEEPER_VERSION $ZOOKEEPER_VERSION
+ curl --silent -C - $ZOO_MIRROR_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}.tar.gz | tar -zx
+ mv ${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX} $ZOOKEEPER_VERSION
chmod a+x $ZOOKEEPER_PATH/bin/zkServer.sh
}
@@ -24,7 +26,8 @@ else
echo "Already downloaded zookeeper $ZOOKEEPER_VERSION to $ZOOKEEPER_PATH"
fi
-export ZOOKEEPER_PATH
+# Used as install_path when starting ZK
+export ZOOKEEPER_PATH="${ZOOKEEPER_PATH}/${ZOOKEEPER_LIB}"
cd $HERE
# Yield execution to venv command
diff --git a/kazoo/testing/common.py b/kazoo/testing/common.py
index 3f0218c..77c7205 100644
--- a/kazoo/testing/common.py
+++ b/kazoo/testing/common.py
@@ -215,7 +215,7 @@ log4j.appender.ROLLINGFILE.File=""" + to_java_compatible_path( # NOQA
"slf4j-api-*.jar")))
jars.extend(glob(os.path.join(
self.install_path,
- "slf4j-log4j-*.jar")))
+ "slf4j-log4j*.jar")))
else:
# Development build (plain `ant`)
jars = glob((os.path.join(
diff --git a/kazoo/tests/test_client.py b/kazoo/tests/test_client.py
index 9f0f9d4..b081542 100644
--- a/kazoo/tests/test_client.py
+++ b/kazoo/tests/test_client.py
@@ -887,10 +887,13 @@ class TestClient(KazooTestCase):
def test_get_acls(self):
from kazoo.security import make_digest_acl
- acl = make_digest_acl('user', 'pass', all=True)
+ user = 'user'
+ passw = 'pass'
+ acl = make_digest_acl(user, passw, all=True)
client = self.client
try:
client.create('/a', acl=[acl])
+ client.add_auth('digest', '{}:{}'.format(user, passw))
self.assertTrue(acl in client.get_acls('/a')[0])
finally:
client.delete('/a')
@@ -901,11 +904,14 @@ class TestClient(KazooTestCase):
def test_set_acls(self):
from kazoo.security import make_digest_acl
- acl = make_digest_acl('user', 'pass', all=True)
+ user = 'user'
+ passw = 'pass'
+ acl = make_digest_acl(user, passw, all=True)
client = self.client
client.create('/a')
try:
client.set_acls('/a', [acl])
+ client.add_auth('digest', '{}:{}'.format(user, passw))
self.assertTrue(acl in client.get_acls('/a')[0])
finally:
client.delete('/a')
diff --git a/setup.py b/setup.py
index 1d7c64b..a619a25 100644
--- a/setup.py
+++ b/setup.py
@@ -58,6 +58,7 @@ setup(
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Communications",
diff --git a/tox.ini b/tox.ini
index 0d9783b..71da3f1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,6 +11,8 @@ envlist =
py35-sasl,
py36,
py36-{sasl,docs},
+ py37,
+ py37-{sasl,docs},
pypy
[testenv:pep8]
@@ -22,6 +24,9 @@ install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
ZOOKEEPER_VERSION={env:ZOOKEEPER_VERSION:}
+ ZOOKEEPER_PREFIX={env:ZOOKEEPER_PREFIX:}
+ ZOOKEEPER_SUFFIX={env:ZOOKEEPER_SUFFIX:}
+ ZOOKEEPER_LIB={env:ZOOKEEPER_LIB:}
deps = -r{toxinidir}/requirements.txt
docs: -r{toxinidir}/requirements_sphinx.txt
gevent: -r{toxinidir}/requirements_gevent.txt