brettcannon/caniusepython3

TypeError: parse_requirements() missing 1 required keyword argument: 'session'

avanov opened this issue · 2 comments

Hello!

caniusepython3==2.2.0 and pip 6.0.6

Traceback (most recent call last):
  File "/vagrant/project/tests/py3_compatibility_test.py", line 11, in test_dependencies
    './project/configure/requirements.txt',
  File "/home/vagrant/pyenv/versions/latest-2/lib/python2.7/site-packages/caniusepython3/__init__.py", line 41, in check
    dependencies = main.projects_from_requirements(requirements_paths)
  File "/home/vagrant/pyenv/versions/latest-2/lib/python2.7/site-packages/caniusepython3/__main__.py", line 37, in projects_from_requirements
    for req in reqs:
  File "/home/vagrant/pyenv/versions/latest-2/lib/python2.7/site-packages/pip/req/req_file.py", line 19, in parse_requirements
    "parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'

Thanks for the report. Unfortunately Travis uses pip 1.5.6 still so I didn't notice the breakage introduced by pip 6.

It looks like parse_requirements() in pip 1.5.6 can take a session argument but it just isn't required, so passing in an instance of PipSession just like in pip 1.5.6 should fix the problem.

At worst I will have a fix out on Friday.

Thanks for the quick reply. Looking forward to it.