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

Install broken on pip 10.x #80

Closed
mattbriancon opened this issue Apr 14, 2018 · 8 comments · Fixed by #82
Closed

Install broken on pip 10.x #80

mattbriancon opened this issue Apr 14, 2018 · 8 comments · Fixed by #82

Comments

@mattbriancon
Copy link
Contributor

From the pip CHANGELOG:

Move all of pip's APIs into the pip._internal package, properly reflecting the fact that pip does not currently have any public APIs. (#4696, #4700)

Collecting ldclient-py==4.0.6 (from -r requirements.txt (line 74))
  Downloading ldclient-py-4.0.6.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qsq8HS/ldclient-py/setup.py", line 9, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-qsq8HS/ldclient-py/
@urgas9
Copy link

urgas9 commented Apr 16, 2018

Struggling with the same issue here, would need this fixed.

@theholy7
Copy link
Contributor

Same here. Please fix :)

@ramkrk
Copy link

ramkrk commented Apr 16, 2018

Same issue. Needs work for PIP 10.
I think it should be
from pip._internal.req import parse_requirements

Downloading ldclient-py-4.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-e0Js8h/ldclient-py/setup.py", line 9, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-e0Js8h/ldclient-py/

@theholy7
Copy link
Contributor

theholy7 commented Apr 16, 2018

I'll try to fix it later tonight if I have time and open a PR

So I don't forget:

def parse_requirements(filename):
    """ load requirements from a pip requirements file """
    lineiter = (line.strip() for line in open(filename))
    return [line for line in lineiter if line and not line.startswith("#")]

mark-adams added a commit to mark-adams/python-client that referenced this issue Apr 16, 2018
Starting in pip 10.x, parse_requirements was moved to an internal
namespace to help demonstrate the fact that it is not a public API.

As a workaround until a broader decision can be made about how this
should look long term, this change attepts to perform the import using
the pip 10.x path and if it fails, falls back on the older path.

Fixes launchdarkly#80.
@pechitook
Copy link

Any workarounds in the meantime? Downgrading pip?

@eli-darkly
Copy link
Contributor

Sorry about this. We'll be putting out a patch release to fix it today— probably will go with implementing the function ourselves as @theholy7 suggested, rather than importing the non-public API which could just get us in trouble again in the future.

(Also in the meantime, downgrading pip is the only workaround as far as I know.)

@theholy7
Copy link
Contributor

@eli-darkly - Just submitted a PR - hopefully it follows your standards :)

@eli-darkly
Copy link
Contributor

ldclient-py 5.0.4 has been released with this fix. Thanks to everyone who reported this and/or submitted PRs.

eli-darkly added a commit that referenced this issue Jan 16, 2019
…port

add feature store wrapper class and make Redis feature store use it
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 a pull request may close this issue.

6 participants