mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
pep508: un-export fields for MarkerEnvironment
We now use the getters and setters everywhere. There were some places where we wanted to build a `MarkerEnvironment` out of whole cloth, usually in tests. To facilitate those use cases, we add a `MarkerEnvironmentBuilder` that provides a convenient constructor. It's basically like a `MarkerEnvironment::new`, but with named parameters. That's useful here because there are so many fields (and they many have the same type).
This commit is contained in:
parent
be12cfb2b8
commit
7d67b7bb49
11 changed files with 198 additions and 169 deletions
|
@ -20,7 +20,7 @@ impl PythonRequirement {
|
|||
}
|
||||
|
||||
pub fn from_marker_environment(interpreter: &Interpreter, env: &MarkerEnvironment) -> Self {
|
||||
Self::new(interpreter, &env.python_full_version)
|
||||
Self::new(interpreter, env.python_full_version())
|
||||
}
|
||||
|
||||
/// Return the installed version of Python.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue