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:
committed by
Andrew Gallant
parent
be12cfb2b8
commit
7d67b7bb49
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user