8000 Bump shutil to 3.12.3 by moreal · Pull Request #5228 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Bump shutil to 3.12.3 #5228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement windows platform target is_junction with junction library
  • Loading branch information
moreal committed Apr 16, 2024
commit 4d11adfc72710e87ecae7edc66a42140ae88b0bd
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ schannel = { workspace = true }
widestring = { workspace = true }
winreg = "0.10.1"

[target.'cfg(windows)'.dependencies.junction]
version = "1.0.0"

[target.'cfg(windows)'.dependencies.windows]
version = "0.52.0"
features = [
Expand Down
5 changes: 1 addition & 4 deletions vm/src/stdlib/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,13 +743,10 @@ pub(super) mod _os {
Ok(false)
}

// TODO: RUSTPYTHON
// Check is_junction method logic is correct.
#[cfg(windows)]
#[pymethod]
fn is_junction(&self, _vm: &VirtualMachine) -> PyResult<bool> {
fs::metadata(&path).map_or(false, |meta| meta.file_type().is_dir())
&& fs::symlink_metadata(&path).map_or(false, |meta| meta.file_type().is_symlink())
Ok(junction::exists(self.pathval.clone()).unwrap_or(false))
}

#[pymethod(magic)]
Expand Down
0