jdiegodcp / ramlfications

Python parser for RAML
https://ramlfications.readthedocs.org
Apache License 2.0
234 stars 50 forks source link

tox bug fails testing on python 3.5.2: ERROR: unknown environment 'py35' #108

Closed nresare closed 7 years ago

nresare commented 7 years ago

Attempted to run tox on the current master of ramlfications (https://github.com/spotify/ramlfications/commit/59ac38977cd45b6bdacde51a5fe12d602ddf1e1f) on a completely vanilla macos machine and it fails with the somewhat cryptic ERROR: unknown environment 'py35'

Steps to reproduce:

  1. start with a completely vanilla macos 10.11.5
  2. install xcode command line tools with xcode-select --install
  3. install brew with the oneliner available from [http://brew.sh/]
  4. install the brew python and python3 with brew install python python3
  5. install and set up virtualenvwrapper: pip install virtualenvwrapper && . /usr/local/bin/virtualenvwrapper.sh
  6. create a virtualenv for python3: mkvirtualenv --python=/usr/local/bin/python3 py3
  7. clone ramlfications: git clone https://github.com/spotify/ramlfications.git
  8. install deps: pip install -r dev-requirements.txt
  9. run tox: tox

Expected outcome: some testing

Actual outcome: tox exits immediately with the somewhat cryptic message ERROR: unknown environment 'py35' even though python --version outputs `Python 3.5.2``

This problem seems to be fixed between tox versions 1.8.1 and 1.9.0, the following change resolves the problem with a minimal delta

index 2c23456..aa6c087 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -4,7 +4,7 @@ check-manifest==0.21
 coverage==3.7.1
 flake8==2.2.3
 sphinx-rtd-theme==0.1.6
-tox==1.7.2
+tox==1.9.0
 pytest==2.6.4
 pytest-cov==1.8.1
 mock==1.0.1

One could discuss which version to upgrade to. I have no knowledge of the inner workings of the tox project, so being conservative with upgrading seems prudent. Another strategy would be to upgrade to the latest released version 2.3.1 or, assuming that semantic versioning is applied correctly the latest minor release, which would be 1.9.2

econchick commented 7 years ago

Addressed with #110. Let me know if there are future issues. Thanks!