You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warn_user_once!("Ignoring `--no-binary` setting from requirements file. Instead, use the `--no-build` command-line argument, or set `no-build` in a `uv.toml` or `pyproject.toml` file.");
1363
1365
}
1364
1366
}
1367
+
1368
+
/// Determine the [`PythonRequest`] to use in a command, if any.
// If it's compatible with the requirement, we can definitely use it
1473
+
if requires_python.specifiers().contains(&version){
1474
+
returntrue;
1475
+
};
1476
+
1477
+
let path = version_file.path();
1478
+
1479
+
// If there's no known project, we're not sure where the Python requirement came from and it's
1480
+
// not safe to use the pin
1481
+
letSome(project) = project else{
1482
+
debug!("Ignoring pinned Python version ({version}) at `{}`, it does not meet the Python requirement of `{requires_python}`.", path.user_display().cyan());
1483
+
returnfalse;
1484
+
};
1485
+
1486
+
// Otherwise, whether or not we should use it depends if it's declared inside or outside of the
1487
+
// project.
1488
+
if path.starts_with(project.root()){
1489
+
// It's the pin is declared _inside_ the project, just warn... but use the version
1490
+
warn_user_once!("The pinned Python version ({version}) in `{}` does not meet the project's Python requirement of `{requires_python}`.", path.user_display().cyan());
1491
+
true
1492
+
}else{
1493
+
// Otherwise, we can just ignore the pin — it's outside the project
1494
+
debug!("Ignoring pinned Python version ({version}) at `{}`, it does not meet the project's Python requirement of `{requires_python}`.", path.user_display().cyan());
0 commit comments