python3-cyberfusion-common 2.11.1__tar.gz → 2.12.1__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.
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/PKG-INFO +3 -4
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/pyproject.toml +3 -4
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/cyberfusion/Common/Config.py +1 -1
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/cyberfusion/Common/Filesystem.py +2 -8
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/cyberfusion/Common/__init__.py +3 -1
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/python3_cyberfusion_common.egg-info/PKG-INFO +3 -4
- python3_cyberfusion_common-2.12.1/src/python3_cyberfusion_common.egg-info/requires.txt +2 -0
- python3_cyberfusion_common-2.11.1/src/python3_cyberfusion_common.egg-info/requires.txt +0 -3
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/README.md +0 -0
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/setup.cfg +0 -0
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/cyberfusion/Common/FilesystemComparison.py +0 -0
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/cyberfusion/Common/exceptions/__init__.py +0 -0
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/python3_cyberfusion_common.egg-info/SOURCES.txt +0 -0
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/python3_cyberfusion_common.egg-info/dependency_links.txt +0 -0
- {python3_cyberfusion_common-2.11.1 → python3_cyberfusion_common-2.12.1}/src/python3_cyberfusion_common.egg-info/top_level.txt +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-cyberfusion-common
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.12.1
|
|
4
4
|
Summary: Common utilities.
|
|
5
5
|
Author-email: Cyberfusion <support@cyberfusion.io>
|
|
6
6
|
Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-common
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist:
|
|
9
|
-
Requires-Dist:
|
|
10
|
-
Requires-Dist: requests==2.28.1
|
|
8
|
+
Requires-Dist: psutil==7.0.0
|
|
9
|
+
Requires-Dist: requests==2.32.3
|
|
11
10
|
|
|
12
11
|
# python3-cyberfusion-common
|
|
13
12
|
|
|
@@ -4,16 +4,15 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python3-cyberfusion-common"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.12.1"
|
|
8
8
|
description = "Common utilities."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
11
11
|
{ name = "Cyberfusion", email = "support@cyberfusion.io" },
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"requests==2.28.1",
|
|
14
|
+
"psutil==7.0.0",
|
|
15
|
+
"requests==2.32.3",
|
|
17
16
|
]
|
|
18
17
|
|
|
19
18
|
[project.urls]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Helper for handling filesystem."""
|
|
2
2
|
|
|
3
|
+
import subprocess
|
|
3
4
|
import os
|
|
4
5
|
from enum import Enum
|
|
5
|
-
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
import psutil
|
|
8
8
|
|
|
@@ -65,15 +65,9 @@ def get_filesystem_type(path: str) -> FilesystemType:
|
|
|
65
65
|
|
|
66
66
|
def get_directory_size(path: str) -> int:
|
|
67
67
|
"""Get size of directory."""
|
|
68
|
-
|
|
69
|
-
# CephFS is a special case, as CephFS has extended attributes to determine
|
|
70
|
-
# size
|
|
71
|
-
|
|
72
68
|
is_ceph = get_filesystem_type(get_filesystem(path)) == FilesystemType.CEPH
|
|
73
69
|
|
|
74
70
|
if is_ceph:
|
|
75
71
|
return int(os.getxattr(path, CEPH_NAME_ATTRIBUTE_RBYTES).decode("utf-8")) # type: ignore[attr-defined]
|
|
76
72
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return sum(f.stat().st_size for f in Path(path).rglob("*") if f.is_file())
|
|
73
|
+
return int(subprocess.check_output(["du", "-s", path], text=True).split()[0])
|
|
@@ -23,7 +23,9 @@ class EmailAddresses:
|
|
|
23
23
|
"""Cyberfusion email addresses."""
|
|
24
24
|
|
|
25
25
|
SYSTEM_MESSAGES_CORE = "system-messages.core@cyberfusion.io"
|
|
26
|
-
SYSTEM_MESSAGES_INFRASTRUCTURE =
|
|
26
|
+
SYSTEM_MESSAGES_INFRASTRUCTURE = (
|
|
27
|
+
"system-messages.foundation@cyberfusion.io" # Backward compatibility
|
|
28
|
+
)
|
|
27
29
|
SYSTEM_MESSAGES_FOUNDATION = "system-messages.foundation@cyberfusion.io"
|
|
28
30
|
SUPPORT = "support@cyberfusion.io"
|
|
29
31
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-cyberfusion-common
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.12.1
|
|
4
4
|
Summary: Common utilities.
|
|
5
5
|
Author-email: Cyberfusion <support@cyberfusion.io>
|
|
6
6
|
Project-URL: Source, https://github.com/CyberfusionIO/python3-cyberfusion-common
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist:
|
|
9
|
-
Requires-Dist:
|
|
10
|
-
Requires-Dist: requests==2.28.1
|
|
8
|
+
Requires-Dist: psutil==7.0.0
|
|
9
|
+
Requires-Dist: requests==2.32.3
|
|
11
10
|
|
|
12
11
|
# python3-cyberfusion-common
|
|
13
12
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|