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

Moving pip main function to own module broke dependent packages #7220

Closed
hgibsonqb opened this issue Oct 15, 2019 · 2 comments
Closed

Moving pip main function to own module broke dependent packages #7220

hgibsonqb opened this issue Oct 15, 2019 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: support User Support

Comments

@hgibsonqb
Copy link

Environment

  • pip version: 19.3
  • Python version: 3.6.8
  • OS: 4.9.184-linuxkit

We're managing dependencies with pipenv, version 2018.10.13

Description

As part of the 19.3 release, pip main function was moved to it's own module 09fd200

This is breaking packages that import and run pip.main with this error

 File "<string>", line 1, in <module>
TypeError: 'module' object is not callable

This change was not listed in the deprecation section for 19.3 https://pip.pypa.io/en/stable/news/#id1

Expected behavior

Expected dependent package to import and run pip main.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Oct 15, 2019
@hgibsonqb hgibsonqb changed the title Moving main function to own module broke dependent packages Moving pip main function to own module broke dependent packages Oct 15, 2019
@pfmoore
Copy link
Member

pfmoore commented Oct 15, 2019

Pip's main function is notr a supported interface - see the documentation. So there is no need for a deprecation period if we change internal APIs, and anyone using those APIs must be prepared to deal with such changes.

@chrahunt
Copy link
Member

As mentioned in #7204, a supported way to execute pip commands is

subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'my_package'])

I will close this as a duplicate of the above.

@chrahunt chrahunt added resolution: duplicate Duplicate of an existing issue/PR type: support User Support labels Oct 15, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Oct 15, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Nov 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: support User Support
Projects
None yet
Development

No branches or pull requests

3 participants