mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Avoid enforcing non-conflicts in uv export
(#9751)
## Summary These are already enforced a level above.
This commit is contained in:
parent
13c4003252
commit
3992295e9a
3 changed files with 98 additions and 9 deletions
|
@ -4143,11 +4143,6 @@ enum LockErrorKind {
|
|||
#[source]
|
||||
err: DependencyGroupError,
|
||||
},
|
||||
/// An error that occurs when trying to export a `uv.lock` with
|
||||
/// conflicting extras/groups specified to `requirements.txt`.
|
||||
/// (Because `requirements.txt` cannot encode them.)
|
||||
#[error("Cannot represent `uv.lock` with conflicting extras or groups as `requirements.txt`")]
|
||||
ConflictsNotAllowedInRequirementsTxt,
|
||||
}
|
||||
|
||||
/// An error that occurs when a source string could not be parsed.
|
||||
|
|
|
@ -19,7 +19,7 @@ use uv_pep508::MarkerTree;
|
|||
use uv_pypi_types::{ParsedArchiveUrl, ParsedGitUrl};
|
||||
|
||||
use crate::graph_ops::marker_reachability;
|
||||
use crate::lock::{LockErrorKind, Package, PackageId, Source};
|
||||
use crate::lock::{Package, PackageId, Source};
|
||||
use crate::universal_marker::UniversalMarker;
|
||||
use crate::{InstallTarget, LockError};
|
||||
|
||||
|
@ -41,9 +41,6 @@ impl<'lock> RequirementsTxtExport<'lock> {
|
|||
hashes: bool,
|
||||
install_options: &'lock InstallOptions,
|
||||
) -> Result<Self, LockError> {
|
||||
if !target.lock().conflicts().is_empty() {
|
||||
return Err(LockErrorKind::ConflictsNotAllowedInRequirementsTxt.into());
|
||||
}
|
||||
let size_guess = target.lock().packages.len();
|
||||
let mut petgraph = Graph::with_capacity(size_guess, size_guess);
|
||||
let mut inverse = FxHashMap::with_capacity_and_hasher(size_guess, FxBuildHasher);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue