mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-14 00:35:00 +00:00
Avoid TOCTOU errors in .python-version
reads (#5223)
## Summary Not a big deal, but better to try the operation and handle the failure case than to check if the file exists and _then_ read it.
This commit is contained in:
parent
ed9b820815
commit
2169902bd9
2 changed files with 21 additions and 33 deletions
|
@ -14,8 +14,8 @@ pub use crate::prefix::Prefix;
|
|||
pub use crate::python_version::PythonVersion;
|
||||
pub use crate::target::Target;
|
||||
pub use crate::version_files::{
|
||||
request_from_version_file, requests_from_version_file, version_file_exists,
|
||||
versions_file_exists, PYTHON_VERSIONS_FILENAME, PYTHON_VERSION_FILENAME,
|
||||
request_from_version_file, requests_from_version_file, PYTHON_VERSIONS_FILENAME,
|
||||
PYTHON_VERSION_FILENAME,
|
||||
};
|
||||
pub use crate::virtualenv::{Error as VirtualEnvError, PyVenvConfiguration, VirtualEnvironment};
|
||||
mod discovery;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue