-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Document the lack of an API #4696
Comments
The better solution is to list alternatives to using pip for the specific use cases that are out there. |
For example, distlib. |
I'll be writing a PR for this in the next few days, hopefully. You can see what I have in mind then. But basically, I expect to explain:
If I can work out how to explain it nicely, I'll also clarify what "not supported" means. But I'm not yet sure what to say on that given the reality is "you got the program for free, so why do you feel you are entitled to anything?" 😄 |
What I normally say is something along the lines of: Not supported means that everything inside of pip is considered an implementation detail, including the fact that the import name is |
One thing we could do, that I've avoided for a while because it would break a lot of things is to restructure our code to make this more obvious, and do something like:
Essentially just moving all of Another, similar option is to do:
Which is really the same basic idea, it just shifts everything down into This would be a big flag day that would break all uses of the internal API (although pretty easy to fix) and would make it pretty obvious that somebody is doing something that isn't supported. It would also probably invalidate every open PR and require a rebase. This might be a better idea than documentation though, since it would become impossible-ish to use pip's internal APIs without importing from a underscore name (possibly one that literally says the word "internal"). Of the two, I think I prefer the |
A big +1 on I think that would be well complemented by addition of a section within the documentation as well. I'll be happy to do what's needed to get this happening, if that's what we decide to do. |
I like this idea, in general, although I too thought it was likely too big a change to be worthwhile. Specifically, I'm in favour of the I still think having some documentation would be useful, and I'm happy to write that. Specific things I would like to cover:
|
I went ahead and opened up #4700. I suspect there will be some test failures that I didn't catch, but it seems to work fine. |
🎉 Nice round number for this change. ^.^ |
Finally got round to writing #4743. Reviews welcome 😄 |
pip does not provide any API. Despite this, there are many people who do import pip and try to use pip, either by using
pip.main
or even invoking pip in different ways.It might be beneficial to document the fact that pip does not provide an API in some part of the documentation.
The text was updated successfully, but these errors were encountered: