Skip to content

Commit

Permalink
Merge pull request #6 from jantman/pip902
Browse files Browse the repository at this point in the history
pip 9.0.2 and 10 fixes
  • Loading branch information
jantman committed Mar 18, 2018
2 parents 09a039b + 5238161 commit 4a23c60
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ bin/
include/

.idea/
.pytest_cache/
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Changelog
=========

Unreleased Changes
0.1.2 (2018-03-18)
------------------

* Fix `Issue #5 <https://github.com/jantman/versionfinder/issues/5>`_ where ``import pip`` fails if ``requests`` has previously been imported. Also proactive fix for pip10 changes.
* Multiple test fixes

0.1.1 (2017-06-16)
Expand Down
2 changes: 1 addition & 1 deletion versionfinder/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
##################################################################################
"""

VERSION = '0.1.1'
VERSION = '0.1.2'
PROJECT_URL = 'https://github.com/jantman/versionfinder'
9 changes: 6 additions & 3 deletions versionfinder/versionfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@
from .versioninfo import VersionInfo

try:
import pip
import pip._internal as pip
except ImportError:
# this is used within try blocks; NBD if they fail
pass
try:
import pip
except (ImportError, KeyError):
# this is used within try blocks; NBD if they fail
pass

try:
import pkg_resources
Expand Down

0 comments on commit 4a23c60

Please sign in to comment.