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

Drop usage of unsupported pip api #680

Closed
wants to merge 3 commits into from
Closed

Drop usage of unsupported pip api #680

wants to merge 3 commits into from

Conversation

kvikshaug
Copy link
Member

@kvikshaug kvikshaug commented Mar 20, 2018

From pip v9.0.2, importing pip after certain packages, like requests, fails. That can cause problems with applications using cobrapy. Additionally, pip now makes it pretty clear that the internal api is not supported.

This PR removes package print output from show_versions and instead encourages issue reporters to include the output of pip list.

@kvikshaug kvikshaug changed the title Don't import pip by default Don't import pip Mar 21, 2018
@kvikshaug kvikshaug changed the title Don't import pip Drop usage of unsupported pip api Mar 21, 2018
@cdiener
Copy link
Member

cdiener commented Apr 24, 2018

Hi thanks that will be changed. I think we will still want to stick with having show_versions since using pip has some pitfalls (pip might not belong to the same distribution as the notebook, python2 and python3 installed at the same time, Windows users sometimes are confused where to run that command, etc). However, we are in the process of switching to pkg_resources so it won't use the pip API anymore. Please see #697 as well.

Thanks and sorry for the delay!

@Midnighter
Copy link
Member

I agree, #697 is the better solution to the problem. Thank you for spotting this so early, though. We should have been warned :/

@Midnighter Midnighter closed this Apr 24, 2018
@codecov-io
Copy link

Codecov Report

Merging #680 into devel will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #680      +/-   ##
==========================================
- Coverage   81.77%   81.72%   -0.06%     
==========================================
  Files          36       36              
  Lines        3644     3633      -11     
  Branches      832      829       -3     
==========================================
- Hits         2980     2969      -11     
  Misses        470      470              
  Partials      194      194
Impacted Files Coverage Δ
cobra/util/version_info.py 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 542b0e8...114b91a. Read the comment docs.

@kvikshaug kvikshaug deleted the fix/pip branch April 25, 2018 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants