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.");
1049
1051
}
1050
1052
}
1053
+
1054
+
/// Determine the [`PythonRequest`] to use in a command, if any.
// If it's compatible with the requirement, we can definitely use it
1139
+
if requires_python.specifiers().contains(&version){
1140
+
returntrue;
1141
+
};
1142
+
1143
+
let path = version_file.path();
1144
+
1145
+
// If there's no known project, we're not sure where the Python requirement came from and it's
1146
+
// not safe to use the pin
1147
+
letSome(project) = project else{
1148
+
debug!("Ignoring pinned Python version ({version}) at `{}`, it does not meet the Python requirement of `{requires_python}`.", path.user_display().cyan());
1149
+
returnfalse;
1150
+
};
1151
+
1152
+
// Otherwise, whether or not we should use it depends if it's declared inside or outside of the
1153
+
// project.
1154
+
if path.starts_with(project.root()){
1155
+
// It's the pin is declared _inside_ the project, just warn... but use the version
1156
+
warn_user_once!("The pinned Python version ({version}) in `{}` does not meet the project's Python requirement of `{requires_python}`.", path.user_display().cyan());
1157
+
true
1158
+
}else{
1159
+
// Otherwise, we can just ignore the pin — it's outside the project
1160
+
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