-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
#206: Preserve environment markers from requirements.in #459
Conversation
For some reason, I can't view the Travis build log. The tests are passing locally for me. Can someone tell me what the Travis build error was? |
From 2.7:
|
3.5 errored and seemed to produce no logs, if you push a new commit it'll restart the tests and it might succeed |
Thanks, I'm seeing build results now. Fixed a test that was failing on Python 3.x and fixed a style checker complaint about lines that are too long. |
@barrywhart can you squash your commits ? I think we can add this to the next feature release (1.9). |
result = writer._format_requirement( | ||
ireq, reverse_dependencies, primary_packages=['test'], | ||
marker=ireq.markers) | ||
result = result.replace('\"', '\'') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why you're modifying the result before asserting on it, why not just assert on the original value of result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was seeing different behavior in Python 2.7 vs 3.5. Python 2.7 preserved quotes in the original format, while Python 3.5 was converting to double quotes. I assume this is a difference in the underlying pip library which parses the lines (including environment markers) from requirements.in
.
Closing this PR. I had already done a "git pull" without "--rebase", which made it hard to squash commits. Here is a new PR with the commits squashed: #460. |
OutputWriter.write()
, pass along the markers fromrequirements.in
format_requirement()
-- add support for optional markersmarker
parameter toOutputWriter.write()
, pass it topiptools.util.format_requirement()