Mntfinder

Latest version: v1.1.0

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.1.0

This version has the following changes:

- Class `MountPointInfo`:
- Implemented `__lt__()`, `__gt__()`, and now its instances are orderable. (Try to compare them with operator `<=` and `>=` will cause a `TypeError`, and this is intended.)
- Sorting or comparing is done via the `target` attribute of the comparison instance.
- Changes of mount point alive detection:
- Method `isStillMounted()` now is marked as deprecated and should use the new method `isAlive()` instead.
- New method `isAlive()` now is totally dynamic, and not store the result after the mount point is unmounted.
- Due to mount point alive detection changes on the above, now its instances are hashable.
- Others:
- Use `MountPointInfo.isAlive()` instead to use `MountPointInfo.isStillMounted()`.

1.0.0

This version has the following changes, some of which are disruptive and NOT compatible with previous versions:

- Class `MountPointInfo`:
- Renamed from `MountInfo`.
- Implemented `__eq__()`, and its instances can now be compared with each other.
- Implemented `__fspath__()`, and its instances can now be used as path-like objects by `os.path.*`, `pathlib.Path`, etc.
- When the instance is used as a path, it reflects the value of the attribute `target`.
- Added method `isStillMounted()`. This method returns `False` when called if attribute `target` is no longer a mount point; otherwise it returns `True`.
- Once this method starts returning `False`, it will not return `True` on any subsequent calls.
- Function `getMountPoint()`:
- Renamed from `findMountPointByTarget()`.
- Removed keyword-only argument `pid`.
- Function `getAllMountPoints()`:
- Renamed from `listAllMountPoints()`.
- Removed all arguments.
- Function `isAMountPoint()`:
- Renamed from `isMountPoint()`.
- Removed all arguments except the positional argument `target`.

0.1.1

- Added bytestring path support for the `target` argument of these functions:
- `mntfinder.getMountPoint()`
- `mntfinder.getAllMountPoints()`
- `mntfinder.isAMountPoint()`
- Removed unused dependency `typing-extensions`.

0.1.0

Initial release.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.