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

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

Closed
pytoxbot opened this Issue Sep 17, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@pytoxbot

pytoxbot commented Sep 17, 2016

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.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @glyph

Wow, what a turnaround! thanks! :-D

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

fix issue281: make --force-deps work when urls are present in a dep config

→ <>

@pytoxbot pytoxbot closed this Sep 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment