diff --git a/.travis.yml b/.travis.yml index c5ffd833..094635f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ python: - "3.3" - "3.4" - "3.5" + - "3.6" - "pypy" sudo: false @@ -16,7 +17,14 @@ cache: env: - USE_OPTIONAL=true - USE_OPTIONAL=false - - SIX_VERSION=1.9 USE_OPTIONAL=true + - DEP_VERSION=min USE_OPTIONAL=true + +matrix: + include: + - python: "2.6" + env: PIP_VERSION=6.1.0 DEP_VERSION=min USE_OPTIONAL=true + - python: "3.3" + env: PIP_VERSION=6.1.0 DEP_VERSION=min USE_OPTIONAL=true install: - ./requirements-install.sh diff --git a/requirements-install.sh b/requirements-install.sh index 7ba9396f..59339db0 100755 --- a/requirements-install.sh +++ b/requirements-install.sh @@ -1,6 +1,14 @@ #!/bin/bash -ex -pip install pip==6.1.0 +if [[ $PIP_VERSION ]]; then + pip install "pip==$PIP_VERSION" +else + pip install -U pip +fi + +if [[ $DEP_VERSION == "min" ]]; then + sed -i'' -e 's/>=/==/g' requirements*.txt +fi pip install -U -r requirements-test.txt @@ -8,10 +16,6 @@ if [[ $USE_OPTIONAL == "true" ]]; then pip install -U -r requirements-optional.txt fi -if [[ $SIX_VERSION ]]; then - pip install six==$SIX_VERSION -fi - if [[ $CI == "true" ]]; then - pip install -U codecov + pip install codecov fi diff --git a/requirements-optional.txt b/requirements-optional.txt index c00fd242..518360b5 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -2,16 +2,16 @@ # We support a Genshi treewalker that can be used to serialize Genshi # streams. -genshi +genshi>=0.7,<2.0 # chardet can be used as a fallback in case we are unable to determine # the encoding of a document. -chardet>=2.2 +chardet>=2.2.1,<3.0 # lxml is supported with its own treebuilder ("lxml") and otherwise # uses the standard ElementTree support -lxml ; platform_python_implementation == 'CPython' +lxml>=2.3,<4.0 ; platform_python_implementation == 'CPython' # DATrie can be used in place of our Python trie implementation for # slightly better parsing performance. -datrie ; platform_python_implementation == 'CPython' +datrie>=0.5,<2.0 ; platform_python_implementation == 'CPython' diff --git a/requirements-test.txt b/requirements-test.txt index 40df78d4..851e41b4 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,8 @@ -r requirements.txt -flake8<3.0 -pytest +flake8==2.6.2 +pycodestyle==2.0.0 +pyflakes==1.2.3 +pytest>=2.7.3,<4.0 pytest-expect>=1.1,<2.0 -mock +mock>=0.7,<3.0 diff --git a/requirements.txt b/requirements.txt index 3884556f..ce36b1d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -six>=1.9 -webencodings -ordereddict ; python_version < '2.7' +six>=1.9,<2.0 +webencodings>=0.5,<0.6 +ordereddict>=1.1,<2.0 ; python_version < '2.7' diff --git a/setup.py b/setup.py index 6f0fc17e..446b008e 100644 --- a/setup.py +++ b/setup.py @@ -102,28 +102,28 @@ def default_environment(): maintainer_email='james@hoppipolla.co.uk', packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), install_requires=[ - 'six>=1.9', - 'webencodings', + 'six>=1.9,<2.0', + 'webencodings>=0.5,<0.6', ], extras_require={ # A empty extra that only has a conditional marker will be # unconditonally installed when the condition matches. - ":python_version == '2.6'": ["ordereddict"], + ":python_version == '2.6'": ["ordereddict>=1.1,<2.0"], # A conditional extra will only install these items when the extra is # requested and the condition matches. - "datrie:platform_python_implementation == 'CPython'": ["datrie"], - "lxml:platform_python_implementation == 'CPython'": ["lxml"], + "datrie:platform_python_implementation == 'CPython'": ["datrie>=0.5,<2.0"], + "lxml:platform_python_implementation == 'CPython'": ["lxml>=2.3,<4.0"], # Standard extras, will be installed when the extra is requested. - "genshi": ["genshi"], - "chardet": ["chardet>=2.2"], + "genshi": ["genshi>=0.7,<2.0"], + "chardet": ["chardet>=2.2.1,<3.0"], # The all extra combines a standard extra which will be used anytime # the all extra is requested, and it extends it with a conditional # extra that will be installed whenever the condition matches and the # all extra is requested. - "all": ["genshi", "chardet>=2.2"], - "all:platform_python_implementation == 'CPython'": ["datrie", "lxml"], + "all": ["genshi>=0.7,<2.0", "chardet>=2.2,<3.0"], + "all:platform_python_implementation == 'CPython'": ["datrie>=0.5,<2.0", "lxml>=2.3,<4.0"], }, ) diff --git a/tox.ini b/tox.ini index da64de71..06f68a25 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,17 @@ [tox] -envlist = {py26,py27,py33,py34,py35,pypy}-{base,optional} +envlist = {py26,py27,py33,py34,py35,py36,pypy}-{base,optional} [testenv] deps = - flake8<3.0 - pytest + flake8==2.6.2 + pycodestyle==2.0.0 + pyflakes==1.2.3 + pytest>=2.7.3,<4.0 pytest-expect>=1.1,<2.0 - mock - base: six - base: webencodings - py26-base: ordereddict + mock>=0.7,<3.0 + base: six>=1.9,<2.0 + base: webencodings>=0.5,<0.6 + py26-base: ordereddict>=1.1,<2.0 optional: -r{toxinidir}/requirements-optional.txt commands =