From efd3f34a0152c5faf5dd72a0acb3a44371148df7 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sun, 18 Jun 2017 09:46:49 +0700 Subject: [PATCH 1/2] Invoke pip once with all constraints pip is not able to correctly manage constraints between invocations. Python 2.6 is currently failing because tox installs the packages in tox-requirements.txt and upgrades existing packages which were pinned in requirements.txt (i.e. attrs) In order to ensure the pinned versions are being tested, invoking pip once with all constraints loaded is the most reliable method. --- .travis.yml | 4 ++-- tox-requirements.txt | 4 +++- tox.ini | 12 +++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c73747c..e001cd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,8 @@ matrix: # # See: https://github.com/travis-ci/travis-ci/issues/3239 # -before_script: - - pip install tox codecov +before_install: + - cat tox-requirements.txt >> requirements.txt script: - tox diff --git a/tox-requirements.txt b/tox-requirements.txt index b0bc3da..b702a9c 100644 --- a/tox-requirements.txt +++ b/tox-requirements.txt @@ -1,6 +1,8 @@ +coverage==4.0.1 +tox pytest==2.8.2 pytest-cov==2.2.0 mock==1.0.1 pytest-mock==0.4.3 pytest-localserver==0.3.4 -coverage==4.0.1 +codecov diff --git a/tox.ini b/tox.ini index 839aa24..001d11f 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,9 @@ envlist = py26, py27, py33, py34, py35, pypy, flake8, manifest, docs setenv = LC_ALL=en_US.utf-8 LANG=en_US.utf-8 -deps = -rtox-requirements.txt +deps = + -rrequirements.txt + -rtox-requirements.txt commands = python setup.py test -a "-v --cov ramlfications --cov-report xml" @@ -14,7 +16,9 @@ basepython = python2.6 setenv = LC_ALL=en_US.utf-8 LANG=en_US.utf-8 -deps = -rtox-requirements.txt +deps = + -rrequirements.txt + -rtox-requirements.txt argparse commands = python setup.py test -a "-v --cov ramlfications --cov-report xml" @@ -25,7 +29,9 @@ basepython = pypy setenv = LC_ALL=en_US.utf-8 LANG=en_US.utf-8 -deps = -rtox-requirements.txt +deps = + -rrequirements.txt + -rtox-requirements.txt commands = python setup.py test From 2944fae6d14b672f34cb412065d86dbcc2736370 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sun, 18 Jun 2017 09:50:36 +0700 Subject: [PATCH 2/2] Add blank line now required by pycodestyle --- ramlfications/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ramlfications/config.py b/ramlfications/config.py index c39a88b..c2ec633 100644 --- a/ramlfications/config.py +++ b/ramlfications/config.py @@ -19,6 +19,7 @@ def _load_media_types(): with open(media_types_file, "r") as f: return json.load(f) + HTTP_METHODS = [ "get", "post", "put", "delete", "patch", "head", "options", "trace", "connect"