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

New versions of pip break setup.py #63

Closed
polyatail opened this issue Apr 30, 2020 · 2 comments
Closed

New versions of pip break setup.py #63

polyatail opened this issue Apr 30, 2020 · 2 comments

Comments

@polyatail
Copy link
Contributor

This is the behavior in pip==18.1 and is I believe what setup.py expects:

>>> from pip._internal.req import parse_requirements
>>> foo = listparse_requirements("requirements.txt", session=False))
>>> foo[0].req
<Requirement('Flask-Cors==3.0.7')>

This is the behavior in pip==20.1:

>>> from pip._internal.req import parse_requirements
>>> foo = list(parse_requirements("requirements.txt", session=False))
>>> foo[0].req
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'ParsedRequirement' object has no attribute 'req'
>>> foo[0].requirement
'Flask-Cors==3.0.7'
@polyatail
Copy link
Contributor Author

polyatail commented Apr 30, 2020

I think generally speaking it's a good idea to avoid internals of other packages since the maintainers tend to break stuff without telling anyone and not feel bad about it.

@thomaxxl
Copy link
Owner

thomaxxl commented May 1, 2020

Thanks, I didn't notice.

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

No branches or pull requests

2 participants