Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

tox config is broken #339

Closed
dhermes opened this issue Nov 15, 2015 · 11 comments
Closed

tox config is broken #339

dhermes opened this issue Nov 15, 2015 · 11 comments

Comments

@dhermes
Copy link
Contributor

dhermes commented Nov 15, 2015

Failures noticed in #336 and #337.

From http://tox.readthedocs.org/en/latest/changelog.html it looks like the 2.2.1 release notes explain the failure

fix bug where {envdir} substitution could not be used in setenv if that env value is then used in {basepython}. Thanks Florian Bruhin.

Seems https://bitbucket.org/hpk42/tox/pull-requests/169/tries-to-fix-99/diff is the PR that fixed something but broke us

@dhermes
Copy link
Contributor Author

dhermes commented Nov 15, 2015

I should add that the offending line is

https://github.com/google/oauth2client/blob/311a53fbcae550526a74057f27cb9df73a0af009/tox.ini#L86-L87

and the issue is a circular reference between setenv and the use of env:KEY:DEFAULT.

dhermes added a commit to dhermes/oauth2client that referenced this issue Nov 16, 2015
This is a temporary workaround due to the config parsing
change introduced in 2.2.0.

See googleapis#339 for more details.
@dhermes
Copy link
Contributor Author

dhermes commented Nov 17, 2015

@jonparrott Any idea on how to fix this? (I did the "cowardly" thing and downgraded tox temporarily.)

@dhermes
Copy link
Contributor Author

dhermes commented Nov 20, 2015

I accidentally stumbled on something which I think/hope will solve this:
googleapis/google-cloud-python#1237

@theacodes
Copy link
Contributor

All I've got is to just wait. We ended up pinning tox in python-docs-samples as well.

Consider tox isn't a direct dependency of library, pinning it for a while doesn't seem too offensive.

@dhermes
Copy link
Contributor Author

dhermes commented Nov 20, 2015

I don't think waiting will work. I think we are permanently broken. I tried making the change suggested by my other PR and get a circular dependency sort of error:

...
  File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 959, in _replace_substitution
    val = self._substitute_from_other_section(sub_key)
  File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 944, in _substitute_from_other_section
    (section, item), self._subststack))
ValueError: ('testenv', 'gae_pythonpath') already in [('testenv:gae', 'setenv'), ('testenv', 'gae_pythonpath'), ('testenv:gae', 'setenv')]

It seems like it is getting a self-reference and it will "always" be impossible for setenv and env to coexist.

@theacodes
Copy link
Contributor

@waprin who's more involved in the testing side than me.

@dhermes
Copy link
Contributor Author

dhermes commented Nov 20, 2015

@jonparrott By forcing me to articulate that

it will "always" be impossible for setenv and env to coexist.

I realized we could just ditch setenv in testenv:gae. w00t!

@dhermes
Copy link
Contributor Author

dhermes commented Nov 20, 2015

Haha JK:

gae runtests: commands[0] | PYTHONPATH= nosetests --with-gae --gae-application=tests/data --logging-level=INFO tests/test_appengine.py
ERROR: InvocationError: could not find executable 'PYTHONPATH='

@waprin
Copy link
Contributor

waprin commented Nov 20, 2015

It's a bug a lot of people are experiencing, people already have PRs to fix it, they are just in the process of getting vetted/merged:

https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files

@dhermes
Copy link
Contributor Author

dhermes commented Nov 20, 2015

w00t. Thanks @waprin

@dhermes
Copy link
Contributor Author

dhermes commented Jan 5, 2016

This is no longer broken right?

@dhermes dhermes closed this as completed Feb 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants