Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tox 3.4.0 broke tox-travis #114

Closed
fschulze opened this issue Sep 21, 2018 · 9 comments
Closed

Tox 3.4.0 broke tox-travis #114

fschulze opened this issue Sep 21, 2018 · 9 comments

Comments

@fschulze
Copy link

Not sure if this is a regression in tox or if tox-travis needs to be updated.

  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/tox_travis/hooks.py", line 46, in tox_configure
    autogen_envconfigs(config, undeclared)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/tox_travis/envlist.py", line 48, in autogen_envconfigs
    make_envconfig = tox.config.parseini.make_envconfig
AttributeError: module 'tox.config' has no attribute 'parseini'

See
https://travis-ci.org/devpi/devpi/builds/431142175

and tox-dev/tox#1011

@davidhuser
Copy link

Seeing the same:

$ python --version
Python 3.5.3 (3f6eaa010fce, Jan 11 2018, 04:44:35)
[PyPy 5.10.1 with GCC 6.2.0 20160901]

pip install tox-travis
Successfully installed toml-0.9.6 tox-3.4.0 tox-travis-0.10 virtualenv-16.0.0
Matching undeclared envs is deprecated. Be sure all the envs that Tox should run are declared in the tox config.
Traceback (most recent call last):
  File "/home/travis/virtualenv/pypy3.5-5.10.1/bin/tox", line 11, in <module>
    sys.exit(cmdline())
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/tox/session.py", line 41, in cmdline
    main(args)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/tox/session.py", line 46, in main
    config = prepare(args)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/tox/session.py", line 28, in prepare
    config = parseconfig(args)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/tox/config.py", line 233, in parseconfig
    pm.hook.tox_configure(config=config)  # post process config object
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/pluggy/__init__.py", line 617, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/pluggy/__init__.py", line 222, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/pluggy/__init__.py", line 216, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/pluggy/callers.py", line 201, in _multicall
    return outcome.get_result()
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/pluggy/callers.py", line 76, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/tox_travis/hooks.py", line 46, in tox_configure
    autogen_envconfigs(config, undeclared)
  File "/home/travis/virtualenv/pypy3.5-5.10.1/site-packages/tox_travis/envlist.py", line 48, in autogen_envconfigs
    make_envconfig = tox.config.parseini.make_envconfig
AttributeError: module 'tox.config' has no attribute 'parseini'```

@gaborbernat
Copy link
Member

This indeed is a change in tox we renamed that object to look like a class. If possible I would prefer tox Travis ammended. Interesting though why tox Travis uses that class. In the meantime as workaround please pin tox version.

@gaborbernat
Copy link
Member

We'll look into adding integration tests against most popular plugins. In the meantime please ammend do the needed changes maintainers.

@blueyed
Copy link
Collaborator

blueyed commented Sep 21, 2018

Matching undeclared envs is deprecated. Be sure all the envs that Tox should run are declared in the tox config.

A better workaround appears to fix the deprecation warning from tox-travis in the first place, i.e. add the env(s) to tox' envlist.

@fschulze
Copy link
Author

@blueyed Hmm, I hadn't noticed the deprecation warning. Problem is, that I can't fix that. On travis I want to run the Python nightly tests, but because there is no release yet, I don't want to include them in the tox.ini. Any idea?

@ryanhiebert
Copy link
Collaborator

ryanhiebert commented Sep 21, 2018

@blueyed: There's some discussion on that deprecation warning, and I will, at least in most cases, be reverting that, I just haven't gotten to it yet. See #97.

@ryanhiebert
Copy link
Collaborator

Unfortunately, my laptop is borked right now, and I'm having to reinstall. PRs welcome, otherwise it'll have to wait until I get my computer up so I can get this fixed. I don't intend to add in compatibility code, so if you do pin tox as a workaround, you may wish to also pin tox-travis, so that when I get this issue fixed it won't re-break your setup until you unpin. Or perhaps you'll want it to break, but that's up to you.

@blueyed
Copy link
Collaborator

blueyed commented Sep 21, 2018

I'll create a PR.

@blueyed
Copy link
Collaborator

blueyed commented Sep 21, 2018

I don't intend to add in compatibility code

Wouldn't be too difficult though:

    try:
        from tox.config import ParseIni  # tox 3.4.0+
        make_envconfig = ParseIni.make_envconfig
    except ImportError:
        from tox.config.parseini import make_envconfig
    # Dig past the unbound method in Python 2
    make_envconfig = getattr(make_envconfig, '__func__', make_envconfig)

blueyed added a commit to blueyed/tox-travis that referenced this issue Sep 21, 2018
@helpr helpr bot added the pr-available label Sep 21, 2018
blueyed added a commit to blueyed/tox-travis that referenced this issue Sep 21, 2018
ryanhiebert pushed a commit that referenced this issue Sep 21, 2018
* minor: sort imports, fix typo

* Fix autogen_envconfigs for tox 3.4.0

Fixes #114
@helpr helpr bot added pr-merged and removed pr-available labels Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants