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

Expose pip.main (but it's still unsupported) #4798

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,11 @@ change without notice. While we do try not to break things as much as possible,
the internal APIs can change at any time, for any reason. It also means that we
generally *won't* fix issues that are a result of using pip in an unsupported way.

For backward compatibility, pip's main command line entry point is exposed as
``pip.main(args)``. The *only* valid usage for this is ``sys.exit(pip.main(args))``
and even that is unsupported. New code should not use this interface, although you
may see it in older applications.

It should also be noted that modifying the contents of ``sys.path`` in a running Python
process is something that should only be done with care. The import system caches
certain data, and installing new packages while a program is running may not always
Expand Down
4 changes: 4 additions & 0 deletions src/pip/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
from __future__ import absolute_import

__version__ = "10.0.0.dev0"

from pip._internal import main