--force-dep breaks when there are deps that include URLs in tox 2.1.1

Issue #281 on hold
Glyph created an issue

See this travis build: https://travis-ci.org/rackerlabs/mimic/jobs/88486237

+tox --recreate --notest --force-dep 'cryptography<1.0'
Traceback (most recent call last):
  File "app_main.py", line 75, in run_toplevel
  File "/home/travis/.venv/bin/tox", line 11, in <module>
    sys.exit(cmdline())
  File "/home/travis/.venv/site-packages/tox/session.py", line 38, in main
    config = prepare(args)
  File "/home/travis/.venv/site-packages/tox/session.py", line 26, in prepare
    config = parseconfig(args)
  File "/home/travis/.venv/site-packages/tox/config.py", line 219, in parseconfig
    parseini(config, inipath)
  File "/home/travis/.venv/site-packages/tox/config.py", line 669, in __init__
    self.make_envconfig(name, section, reader._subs, config)
  File "/home/travis/.venv/site-packages/tox/config.py", line 706, in make_envconfig
    res = env_attr.postprocess(testenv_config=vc, value=res)
  File "/home/travis/.venv/site-packages/tox/config.py", line 117, in postprocess
    name = self._replace_forced_dep(name, config)
  File "/home/travis/.venv/site-packages/tox/config.py", line 133, in _replace_forced_dep
    if self._is_same_dep(forced_dep, name):
  File "/home/travis/.venv/site-packages/tox/config.py", line 144, in _is_same_dep
    dep2_name = pkg_resources.Requirement.parse(dep2).project_name
  File "/home/travis/.venv/site-packages/pkg_resources/__init__.py", line 2986, in parse
    reqs = list(parse_requirements(s))
  File "/home/travis/.venv/site-packages/pkg_resources/__init__.py", line 2930, in parse_requirements
    "version spec")
  File "/home/travis/.venv/site-packages/pkg_resources/__init__.py", line 2895, in scan_list
    raise RequirementParseError(msg, line, "at", line[p:])
RequirementParseError: Expected version spec in https://github.com/twisted/twisted/tarball/trunk at ://github.com/twisted/twisted/tarball/trunk

The offending lines in the tox.ini are:

[testenv:py34]
deps =
    "https://github.com/twisted/twisted/tarball/trunk#egg=twisted"
    "https://github.com/twisted/treq/tarball/master#egg=treq"
    "https://github.com/twisted/klein/tarball/master#egg=klein"
    {[testenv]deps}

py34 isn't even the environment being built.

Comments (4)

  1. Log in to comment