Add support for parsing unnamed URL requirements (#2567)

## Summary

First piece of https://github.com/astral-sh/uv/issues/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: https://github.com/astral-sh/uv/issues/313.
This commit is contained in:
Charlie Marsh 2024-03-20 23:28:58 -04:00 committed by GitHub
parent 0af6a3d41d
commit ee211b35bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 2122 additions and 1305 deletions

View file

@ -3,7 +3,7 @@ pub use error::ResolveError;
pub use finder::{DistFinder, Reporter as FinderReporter};
pub use manifest::Manifest;
pub use options::{Options, OptionsBuilder};
pub use preferences::Preference;
pub use preferences::{Preference, PreferenceError};
pub use prerelease_mode::PreReleaseMode;
pub use python_requirement::PythonRequirement;
pub use resolution::{AnnotationStyle, Diagnostic, DisplayResolutionGraph, ResolutionGraph};
@ -15,6 +15,7 @@ pub use resolver::{
};
pub use version_map::VersionMap;
mod bare;
mod candidate_selector;
mod constraints;
mod dependency_mode;