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

Add pip.main as func raising clean error #5254

Closed
wants to merge 1 commit into from

Commits on Apr 16, 2018

  1. Add pip.main as func raising clean error

    This has upsides and downsides. It improves the errors and guidance for
    those who invoke `pip.main`, but it changes the time of failure for some
    modules attempting to import and use `pip.main`. Instead of failing at
    import time, they'll fail when they invoke `pip.main()`.
    On the plus side, it means that modules which import pip.main but only
    use it in some of their functions/classes may remain otherwise
    functional, so the scope of breakage is reduced.
    
    Modules using `pip.main()` are going to be broken one way or another,
    and although ImportErrors will be superior for a number of users, it
    forbids us from sending good and clear messaging about what to do to
    remediate.
    
    Advertising pip<10 as "maybe working" is probably a bit controversial,
    but it's practical/useful info. Whether or not pip takes a hardline
    stance on this is a matter for discussion/debate.
    sirosen committed Apr 16, 2018
    Configuration menu
    Copy the full SHA
    d606e7a View commit details
    Browse the repository at this point in the history