tox == 2.2.1 failed with 'RuntimeError: maximum recursion depth exceeded while calling a Python object'

Bug #1534006 reported by Sam Wan
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Ghanshyam Mann

Bug Description

Devstack fails when running tox operations on Tempest's tox.ini with tox==2.2.1

================
2016-01-14 03:30:46.413 | ++ tox --notest -efull
2016-01-14 03:30:46.677 | Traceback (most recent call last):
2016-01-14 03:30:46.677 | File "/usr/local/bin/tox", line 11, in <module>
2016-01-14 03:30:46.677 | sys.exit(cmdline())
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 38, in main
2016-01-14 03:30:46.677 | config = prepare(args)
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 26, in prepare
2016-01-14 03:30:46.677 | config = parseconfig(args)
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 223, in parseconfig
2016-01-14 03:30:46.677 | parseini(config, inipath)
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 676, in __init__
2016-01-14 03:30:46.677 | self.make_envconfig(name, section, reader._subs, config)
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 704, in make_envconfig
2016-01-14 03:30:46.677 | res = meth(env_attr.name, env_attr.default)
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 839, in getdict
2016-01-14 03:30:46.677 | s = self.getstring(name, None)
2016-01-14 03:30:46.677 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 893, in getstring
2016-01-14 03:30:46.677 | x = self._replace(x)
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 993, in _replace
2016-01-14 03:30:46.678 | return RE_ITEM_REF.sub(self._replace_match, x)
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 989, in _replace_match
2016-01-14 03:30:46.678 | return handler(match)
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 913, in _replace_env
2016-01-14 03:30:46.678 | env_list = self.getdict('setenv')
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 839, in getdict
2016-01-14 03:30:46.678 | s = self.getstring(name, None)
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 893, in getstring
2016-01-14 03:30:46.678 | x = self._replace(x)
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 993, in _replace
2016-01-14 03:30:46.678 | return RE_ITEM_REF.sub(self._replace_match, x)
2016-01-14 03:30:46.678 | File "/usr/local/lib/python2.7/dist-packages/tox/config.py", line 989, in _replace_match
...
2016-01-14 03:30:46.761 | File "/usr/local/lib/python2.7/dist-packages/py/_iniconfig.py", line 151, in __getitem__
2016-01-14 03:30:46.761 | return SectionWrapper(self, name)
2016-01-14 03:30:46.761 | RuntimeError: maximum recursion depth exceeded while calling a Python object
=============

detailed logs:
http://publiclogs.emc.com/vnx_ostack/EMC_VNX_ISCSI/5736/logs/devstacklog.txt.gz
pip:
http://publiclogs.emc.com/vnx_ostack/EMC_VNX_ISCSI/5736/logs/pip-freeze.txt.gz

Revision history for this message
Sam Wan (sam-wan) wrote :
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

yea, it was regression in tox 2.2.0

https://bitbucket.org/hpk42/tox/issues/99/environment-variable-usage-schema-env-xxx

It is fixed in 2.3.1
https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files

So no issue with 2.3.1, but let's raise the min version in tox.ini

Changed in tempest:
status: New → Confirmed
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/267382

Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/267382
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3a59e1ef92ed5d4da964950872c399496f0c401d
Submitter: Jenkins
Branch: master

commit 3a59e1ef92ed5d4da964950872c399496f0c401d
Author: Ghanshyam <email address hidden>
Date: Thu Jan 14 17:15:29 2016 +0900

    Raise tox min version to avoid maximum recursion issue

    There was regression in tox 2.2.0 for env-substitution
    with setenv.

    https://bitbucket.org/hpk42/tox/issues/99/environment-variable-usage-schema-env-xxx

    It is fixed in 2.3.1
    https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files

    So no issue with 2.3.1, but let's raise the min version in tox.ini
    to avoid maximum recursion issue.

    Change-Id: Ie808e46a90a681b21c30998d2fc867981c2c05fd
    Closes-Bug: #1534006

Changed in tempest:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.