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

Add support for parsing unnamed URL requirements #2567

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Mar 20, 2024

Summary

First piece of #313. In order to support unnamed requirements, we need to be able to parse them in requirements-txt, which in turn means that we need to introduce a new type that's distinct from pep508::Requirement, given that these aren't PEP 508-compatible requirements.

Part of: #313.

@charliermarsh charliermarsh force-pushed the charlie/bare-i branch 8 times, most recently from 47dd6cd to ae55727 Compare March 20, 2024 17:15
@@ -1254,6 +1249,27 @@ mod test {
insta::assert_debug_snapshot!(snapshot, actual);
}

#[cfg(unix)]
#[test_case(Path::new("bare-url.txt"))]
Copy link
Member Author

Choose a reason for hiding this comment

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

I really tried, but there are so many weirdnesses in the Windows version because it's a file URL, or something. I gave up with the filters.

@charliermarsh charliermarsh force-pushed the charlie/bare-i branch 4 times, most recently from ea57da0 to 48ea955 Compare March 20, 2024 17:50
@charliermarsh charliermarsh marked this pull request as ready for review March 20, 2024 18:16
crates/pep508-rs/src/lib.rs Outdated Show resolved Hide resolved
@charliermarsh charliermarsh force-pushed the charlie/bare-i branch 2 times, most recently from fb6d149 to 1dd4c68 Compare March 21, 2024 03:22
@charliermarsh charliermarsh enabled auto-merge (squash) March 21, 2024 03:26
@charliermarsh charliermarsh merged commit ee211b3 into main Mar 21, 2024
31 checks passed
@charliermarsh charliermarsh deleted the charlie/bare-i branch March 21, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants