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

pipchecker doesn't works with latest pip version #630

Closed
dvl opened this issue Feb 28, 2015 · 4 comments
Closed

pipchecker doesn't works with latest pip version #630

dvl opened this issue Feb 28, 2015 · 4 comments

Comments

@dvl
Copy link

dvl commented Feb 28, 2015

Since I've updated pip to latest version I can't use pipchecker anymore, if I downgrade pip to previous version it works fine.

$ ./manage.py pipchecker
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django/core/management/base.py", line 533, in handle
    return self.handle_noargs(**options)
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django_extensions/management/utils.py", line 77, in inner
    ret = func(self, *args, **kwargs)
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages/django_extensions/management/commands/pipchecker.py", line 72, in handle_noargs
    for req in parse_requirements(filename, options=mockoptions):
  File "/home/dvl/.virtualenvs/infobusca/lib/python3.4/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'
$ pip --version
pip 6.0.8 from /home/dvl/.virtualenvs/infobusca/lib/python3.4/site-packages (python 3.4)
@trbs
Copy link
Member

trbs commented Mar 9, 2015

Thanks for reporting this !

This fix also works for me on 1.5.6 up to 6.0.8.
Could you please test it ?

It also leaves room for further improvements by allowing to support pip command line options like --cache-dir and --cert etc.

@trbs trbs closed this as completed Mar 9, 2015
@dvl
Copy link
Author

dvl commented Mar 9, 2015

The command is working now, but it's failing to find some packages.

Example:

# requirements.txt
Django==1.7.4  # the package name is capitalized on pypi
model_mommy==1.2.3  # the package name has underscore on pypi

with pip 6.0.8 I got the following output:

$ m pipchecker        
Django 1.7.4                     release is not on pypi (check capitalization and/or --extra-index-url)
model-mommy 1.2.3                release is not on pypi (check capitalization and/or --extra-index-url)

(even changing capitalization the result is the same)

and with pip 1.5.6:

$ m pipchecker
Django 1.7.4                     1.8b1 available

Thanks for your help

@kevgathuku
Copy link
Contributor

@dvl @trbs I've submitted a patch that for now fixes the issue with packages starting with an uppercase letter not being parsed correctly.
Previously the package name was being converted to lowercase hence not being detected correctly.
I've tested it on pip 6.0.8
Would really love to hear your feedback on it.

@kevgathuku
Copy link
Contributor

Here's the output I'm getting

(generator)kevin@kingkev-pc ~/code/projects/redditclone $ ./manage.py pipchecker
django-toolbelt                          not installed
Pillow 2.7.0                     2.8.1 available
Django 1.7.4                     1.8 available
prospector 0.9.9                 0.10 available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants