Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed import error for pip version 10 #61

Merged
merged 4 commits into from
May 9, 2018
Merged

Fixed import error for pip version 10 #61

merged 4 commits into from
May 9, 2018

Conversation

fronzbot
Copy link
Owner

@fronzbot fronzbot commented May 9, 2018

Description:

With pip10, import from pip.req for the parse_requirements functions is deprecated and replaced with pip._internals.req

Checklist:

  • Local tests with tox run successfully PR cannot be meged unless tests pass

setup.py Outdated
# https://stackoverflow.com/a/49867265
try: # pip > 10
from pip._internal.req import parse_requirements
except ImportError: # pip < 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment

setup.py Outdated
from pip.req import parse_requirements
# Fixes import error due to breaking change in pip 10
# https://stackoverflow.com/a/49867265
try: # pip > 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment

setup.py Outdated
# https://stackoverflow.com/a/49867265
try: # pip > 10
from pip._internal.req import parse_requirements
except ImportError: # pip < 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline comment should start with '# '

setup.py Outdated
from pip.req import parse_requirements
# Fixes import error due to breaking change in pip 10
# https://stackoverflow.com/a/49867265
try: # pip > 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline comment should start with '# '

@fronzbot fronzbot merged commit a8f9040 into dev May 9, 2018
@fronzbot fronzbot deleted the pip-fix branch May 9, 2018 14:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants