Git Product home page Git Product logo

pip-pop's People

Contributors

branliu0 avatar dangra avatar kennethreitz avatar msabramo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pip-pop's Issues

python deploy ModuleNotFoundError

got error in deploy

File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 18, in <module>
    from pip._internal.download import PipSession as session
ModuleNotFoundError: No module named 'pip._internal.download'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/tmp/buildpacks/8790c95df255b386056ea169648fd4a33d1cb3fba81f73b536f26374f6af107145f64a5980db7a52177f63bb41527f360ebd2e3bef7b8917bda7b51cf284cfdb/vendor/pip-pop/pip-diff", line 30, in <module>
    from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'

I found one problem with pop-diff

the code:
def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None):
include_versions = True if include_stale else False
excludes = excludes if len(excludes) else []

in python 2.7.1.4
if excludes=None
then len(excludes) is error

Figure out allow_external bug

File "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1605, in parse_requirements
    finder.allow_external |= set([normalize_name(line).lower()])
AttributeError: 'NoneType' object has no attribute 'allow_external'

Support pip 8 hashes

pip 8 introduces a new feature that allows people to bake hashes into their requirements.txt, unfortunately this breaks pip-diff. An example would be https://github.com/pypa/warehouse/blob/master/requirements/main.txt

Output looks like:

Traceback (most recent call last):
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip-grep", line 81, in <module>
    main()
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip-grep", line 76, in main
    grep(**kwargs)
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip-grep", line 45, in grep
    r = Requirements(reqfile)
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip-grep", line 25, in __init__
    self.load(reqfile)
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip-grep", line 36, in load
    for requirement in parse_requirements(reqfile, finder=finder, session=requests):
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip/req/req_file.py", line 89, in parse_requirements
    for req in req_iter:
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip/req/req_file.py", line 172, in process_line
    for req in parser:
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip/req/req_file.py", line 89, in parse_requirements
    for req in req_iter:
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip/req/req_file.py", line 119, in process_line
    opts, _ = parser.parse_args(shlex.split(options_str), defaults)
  File "/app/.heroku/python/lib/python3.5/optparse.py", line 1388, in parse_args
    self.error(str(err))
  File "/app/.heroku/python/lib/python3.5/optparse.py", line 1568, in error
    self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
  File "/app/tmp/buildpacks/python/vendor/pip-pop/pip/req/req_file.py", line 238, in parser_exit
    raise RequirementsFileParseError(msg)
pip.exceptions.RequirementsFileParseError: pip-grep: error: no such option: --hash

Broken with recent versions of pip

pip changed the signature of parse_requirements to require a session keyword argument as of version 6. Should be able to pass in whatever session is required for forward and backward compat. I'll submit a PR when I get time if you've not gotten to it by then.

Question about pip-grep

If the parameters contain multiple packages, such as "pip-grep tests/test-requirements.txt requests django", and the "test-requirements.txt" include these two packages too. But the program only print the first package. Is it normal?
Thanks.

Add support for pip 8.x

Currently with pip 8.1.2, the following exception is raised:

$ ./pip-grep foo.txt requests
Traceback (most recent call last):
  File "./pip-grep", line 81, in <module>
    main()
  File "./pip-grep", line 76, in main
    grep(**kwargs)
  File "./pip-grep", line 57, in grep
    if requirement.req.project_name in packages:
AttributeError: 'Requirement' object has no attribute 'project_name'

This is caused by pypa/pip#3307 , which changed the type of req, such that it now has a name attribute rather than project_name.

To avoid surprises with new versions of pip, and to prevent regressions with older versions when making compatibility fixes, I've filed #9.

ImportError: No module named _vendor.requests

stone@mint ~/git/pip-pop/bin $ ./pip-diff
Traceback (most recent call last):
File "./pip-diff", line 17, in
from pip._vendor.requests import session
ImportError: No module named _vendor.requests

Do I need to install some modules?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.