-
Notifications
You must be signed in to change notification settings - Fork 252
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
fix(packages/dependency): add space after filename for file dependencies with markers #153
fix(packages/dependency): add space after filename for file dependencies with markers #153
Conversation
I have now appeased the windows 😅 |
acd21af
to
2e98b2e
Compare
Update: this solves the case of the missing space prior to the ";", but immediately runs up against the fact that a relative file is not a valid URL:
It's possible that my "fix" is actually fixing the wrong thing; if I was including this as an absolute path with a In my case I can't provide an absolute path due to varied setup on hosts that'll receive this code. I'm going to think about this some more, if you decide the close this PR without merging I understand :) - if you want changes made, I'm happy to make them. |
after more research I see this is incorrect. This change makes the output of this stage of the process 508 compliant, where as prior to this it was not. So in that regard this is indeed fixing a problem. The fact that pip doesn't have a solution for understanding relative paths is a well discussed situation: pypa/pip#6658 |
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.
Thanks a lot. Looks good to me 👍
Just a small suggestion to improve the test.
@@ -62,3 +65,31 @@ def test_file_dependency_pep_508_local_file_relative_path(mocker): | |||
|
|||
requirement = "{} @ {}".format("demo", path) | |||
_test_file_dependency_pep_508(mocker, "demo", path, requirement) | |||
|
|||
|
|||
def test_to_pep_508_with_marker(mocker): |
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 think we can use a parameterize test here, to test absolute and relative path.
…ies with markers local vendored files need a space after the file name and before the ";" which demarks the start of markers fix #3872
2e98b2e
to
b4607fe
Compare
@finswimmer thanks for the feedback 👍 I went ahead and restructured that unit test into two. I considered parameterizing the test and I could see three main options:
I felt the 3rd option strikes the best balance with clarity, it's a step necessary for the 2nd option, and I'm happy to add that additional layer if you think the deduplication is desirable. |
Resolves: python-poetry/poetry#3872
local vendored files need a space after the file name and before the ";" which demarks the start of
markers