superpathlib 2.0.2__tar.gz → 2.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {superpathlib-2.0.2/src/superpathlib.egg-info → superpathlib-2.0.3}/PKG-INFO +1 -1
- {superpathlib-2.0.2 → superpathlib-2.0.3}/pyproject.toml +1 -1
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/metadata_properties.py +5 -4
- {superpathlib-2.0.2 → superpathlib-2.0.3/src/superpathlib.egg-info}/PKG-INFO +1 -1
- {superpathlib-2.0.2 → superpathlib-2.0.3}/LICENSE +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/README.md +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/setup.cfg +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/__init__.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/base.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/cached_content.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/common_folders.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/content_properties.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/encryption.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/extra_functionality.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/override.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/path.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/py.typed +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/tags.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib/utils.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib.egg-info/SOURCES.txt +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib.egg-info/dependency_links.txt +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib.egg-info/requires.txt +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/src/superpathlib.egg-info/top_level.txt +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/tests/test_cached_content.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/tests/test_common_folders.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/tests/test_content.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/tests/test_encrypted_content.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/tests/test_functionality.py +0 -0
- {superpathlib-2.0.2 → superpathlib-2.0.3}/tests/test_metadata.py +0 -0
|
@@ -44,8 +44,9 @@ class Path(content_properties.Path):
|
|
|
44
44
|
def mtime(self, time: float) -> None:
|
|
45
45
|
os.utime(self, (time, time)) # set create time as well
|
|
46
46
|
|
|
47
|
+
command = "touch", "-d", f"@{time}", self
|
|
47
48
|
try:
|
|
48
|
-
subprocess.run(
|
|
49
|
+
subprocess.run(command)
|
|
49
50
|
except subprocess.CalledProcessError: # pragma: nocover
|
|
50
51
|
pass # Doesn't work on Windows
|
|
51
52
|
|
|
@@ -102,11 +103,11 @@ class Path(content_properties.Path):
|
|
|
102
103
|
return filetype
|
|
103
104
|
|
|
104
105
|
@property
|
|
105
|
-
def content_hash(self) -> str:
|
|
106
|
+
def content_hash(self) -> str | None:
|
|
106
107
|
return self.file_content_hash if self.is_file() else self.dir_content_hash
|
|
107
108
|
|
|
108
109
|
@property
|
|
109
|
-
def dir_content_hash(self) -> str:
|
|
110
|
+
def dir_content_hash(self) -> str | None:
|
|
110
111
|
# dirhash package throws annoying warnings
|
|
111
112
|
warnings.filterwarnings(
|
|
112
113
|
action="ignore", module="pkg_resources|dirhash", category=DeprecationWarning
|
|
@@ -116,7 +117,7 @@ class Path(content_properties.Path):
|
|
|
116
117
|
|
|
117
118
|
# use default algorithm used in cloud provider checksums
|
|
118
119
|
# can be efficient because not used for cryptographic security
|
|
119
|
-
content_hash = dirhash.dirhash(self, "md5")
|
|
120
|
+
content_hash = dirhash.dirhash(self, "md5") if self.exists() else None
|
|
120
121
|
return typing.cast(str, content_hash)
|
|
121
122
|
|
|
122
123
|
@property
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|