karton-core
Advanced tools
| import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('karton',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('karton', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('karton', [os.path.dirname(p)])));m = m or sys.modules.setdefault('karton', types.ModuleType('karton'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p) |
@@ -1,1 +0,1 @@ | ||
| __version__ = "5.6.0" | ||
| __version__ = "5.6.1" |
@@ -1024,3 +1024,6 @@ import dataclasses | ||
| def remove_object_versions( | ||
| self, bucket: str, object_versions: Dict[str, List[str]] | ||
| self, | ||
| bucket: str, | ||
| object_versions: Dict[str, List[str]], | ||
| explicit_version_null: bool = False, | ||
| ) -> None: | ||
@@ -1032,10 +1035,17 @@ """ | ||
| :param object_versions: Object version identifiers | ||
| :param explicit_version_null: | | ||
| Some S3 providers (e.g. MinIO) need a reference | ||
| to "null" version explicitly when versioning is in suspended state. On the | ||
| other hand, some providers refuse to delete "null" versions when bucket | ||
| versioning is disabled. | ||
| See also: https://github.com/CERT-Polska/karton/issues/273. | ||
| """ | ||
| versions = iter( | ||
| (uid, version_id) | ||
| for uid, versions in object_versions.items() | ||
| for version_id in versions | ||
| ) | ||
| deletion_chunks = chunks( | ||
| [{"Key": uid, "VersionId": version_id} for uid, version_id in versions], | ||
| [ | ||
| {"Key": uid, "VersionId": version_id} | ||
| if version_id != "null" or explicit_version_null | ||
| else {"Key": uid} | ||
| for uid, versions in object_versions.items() | ||
| for version_id in versions | ||
| ], | ||
| 100, | ||
@@ -1042,0 +1052,0 @@ ) |
@@ -52,2 +52,5 @@ import argparse | ||
| ) | ||
| self.enable_null_version_deletion = self.config.getboolean( | ||
| "system", "enable_null_version_deletion", False | ||
| ) | ||
@@ -65,2 +68,3 @@ self.last_gc_trigger = time.time() | ||
| " enable_router:\t%s\n" | ||
| " enable_null_version_deletion:\t%s\n" | ||
| " crash_started_tasks_on_timeout:\t%s", | ||
@@ -73,2 +77,3 @@ self.gc_interval, | ||
| self.enable_router, | ||
| self.enable_null_version_deletion, | ||
| self.crash_started_tasks_on_timeout, | ||
@@ -94,3 +99,7 @@ ) | ||
| if resources_to_remove: | ||
| self.backend.remove_object_versions(karton_bucket, resources_to_remove) | ||
| self.backend.remove_object_versions( | ||
| karton_bucket, | ||
| resources_to_remove, | ||
| explicit_version_null=self.enable_null_version_deletion, | ||
| ) | ||
@@ -97,0 +106,0 @@ def gc_collect_tasks(self) -> None: |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: karton-core | ||
| Version: 5.6.0 | ||
| Version: 5.6.1 | ||
| Summary: Distributed malware analysis orchestration framework | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/CERT-Polska/karton |
+11
-11
@@ -1,5 +0,5 @@ | ||
| karton_core-5.6.0-nspkg.pth,sha256=vHa-jm6pBTeInFrmnsHMg9AOeD88czzQy-6QCFbpRcM,539 | ||
| karton_core-5.6.1-nspkg.pth,sha256=vHa-jm6pBTeInFrmnsHMg9AOeD88czzQy-6QCFbpRcM,539 | ||
| karton/core/__init__.py,sha256=QuT0BWZyp799eY90tK3H1OD2hwuusqMJq8vQwpB3kG4,337 | ||
| karton/core/__version__.py,sha256=9eGec3AYz2CNznnfEwKYRiJ65G9gDWtXmb587ljDycg,22 | ||
| karton/core/backend.py,sha256=HlAolngYUTx2ajXhLf5RbWxmPOq5orLfz52iTkNxxqM,38147 | ||
| karton/core/__version__.py,sha256=-q9tSF5ofTJum4PMjvbhaE1xmTXehc_9rxMGcmfodcw,22 | ||
| karton/core/backend.py,sha256=g0BSQBsFAksRd_VY5QDjBJ8yIIyzAmwxy-kfJgAZ_lo,38628 | ||
| karton/core/base.py,sha256=C6Lco3E0XCsxvEjeVOLR9fxh_IWJ1vjC9BqUYsQyewE,8083 | ||
@@ -20,9 +20,9 @@ karton/core/config.py,sha256=7oKchitq6pWzPuXRfjBXqVT_BgGIz2p-CDo1RGaNJQg,8118 | ||
| karton/system/__main__.py,sha256=QJkwIlSwaPRdzwKlNmCAL41HtDAa73db9MZKWmOfxGM,56 | ||
| karton/system/system.py,sha256=v2rEJYN2Vq5-hH8yUGFv6r2ZdX-TOQg0ldsEC2T6qO8,16315 | ||
| karton_core-5.6.0.dist-info/LICENSE,sha256=o8h7hYhn7BJC_-DmrfqWwLjaR_Gbe0TZOOQJuN2ca3I,1519 | ||
| karton_core-5.6.0.dist-info/METADATA,sha256=Atu4wfGAqbkw-lVDV_Wtt3fxSG7nV0QmVqjGnfNAFZ4,6818 | ||
| karton_core-5.6.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92 | ||
| karton_core-5.6.0.dist-info/entry_points.txt,sha256=OgLlsXy61GP6-Yob3oXqeJ2hlRU6LBLj33fr0NufKz0,98 | ||
| karton_core-5.6.0.dist-info/namespace_packages.txt,sha256=X8SslCPsqXDCnGZqrYYolzT3xPzJMq1r-ZQSc0jfAEA,7 | ||
| karton_core-5.6.0.dist-info/top_level.txt,sha256=X8SslCPsqXDCnGZqrYYolzT3xPzJMq1r-ZQSc0jfAEA,7 | ||
| karton_core-5.6.0.dist-info/RECORD,, | ||
| karton/system/system.py,sha256=cFE4hCS0LWnwdCiIjU0ym8dHujE5ORi4REJR_y5b2gA,16671 | ||
| karton_core-5.6.1.dist-info/LICENSE,sha256=o8h7hYhn7BJC_-DmrfqWwLjaR_Gbe0TZOOQJuN2ca3I,1519 | ||
| karton_core-5.6.1.dist-info/METADATA,sha256=AJoa9O_0SOYI3IuVHXhwB6lXoUSs7S4nU6QM8_xHxVI,6818 | ||
| karton_core-5.6.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92 | ||
| karton_core-5.6.1.dist-info/entry_points.txt,sha256=OgLlsXy61GP6-Yob3oXqeJ2hlRU6LBLj33fr0NufKz0,98 | ||
| karton_core-5.6.1.dist-info/namespace_packages.txt,sha256=X8SslCPsqXDCnGZqrYYolzT3xPzJMq1r-ZQSc0jfAEA,7 | ||
| karton_core-5.6.1.dist-info/top_level.txt,sha256=X8SslCPsqXDCnGZqrYYolzT3xPzJMq1r-ZQSc0jfAEA,7 | ||
| karton_core-5.6.1.dist-info/RECORD,, |
| import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('karton',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('karton', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('karton', [os.path.dirname(p)])));m = m or sys.modules.setdefault('karton', types.ModuleType('karton'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p) |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.