diff --git a/WrenchCL/Connect/ProcessingTracker.py b/WrenchCL/Connect/ProcessingTracker.py index 2f2cc79..84542b3 100644 --- a/WrenchCL/Connect/ProcessingTracker.py +++ b/WrenchCL/Connect/ProcessingTracker.py @@ -14,7 +14,11 @@ from ..Decorators import SingletonClass # from ..Types.TTLSet import TTLSet -TTLSet = set # type: ignore[assignment] # TODO: TTLSet not yet implemented +class TTLSet(set): # type: ignore[override] + """Stub for TTLSet — accepts ttl kwarg, behaves as a plain set until TTLSet is implemented.""" + + def __init__(self, *args: object, ttl: int = 0, **kwargs: object) -> None: + super().__init__(*args, **kwargs) if TYPE_CHECKING: from mypy_boto3_rds import RDSClient diff --git a/WrenchCL/Connect/__init__.py b/WrenchCL/Connect/__init__.py index eecba84..1a7ea6c 100644 --- a/WrenchCL/Connect/__init__.py +++ b/WrenchCL/Connect/__init__.py @@ -28,7 +28,7 @@ def _dep_available(name: str) -> bool: f"AWS functionality requires additional dependencies.\n" f"Missing Packages:\n -{missing_str}\n" f"Install with: pip install 'WrenchCL[aws]'" - ) + ) from None from .AwsClientHub import AwsClientHub from .Lambda import handle_lambda_response diff --git a/WrenchCL/_Internal/Logging/Api/__init__.py b/WrenchCL/_Internal/Logging/Api/__init__.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Api/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/__init__.cpython-311.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index f8b9018..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/__init__.cpython-314.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index b51c0b1..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/base_logger.cpython-311.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/base_logger.cpython-311.pyc deleted file mode 100644 index 5e8d793..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/base_logger.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/base_logger.cpython-314.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/base_logger.cpython-314.pyc deleted file mode 100644 index 16ae577..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/base_logger.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/internal_api.cpython-311.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/internal_api.cpython-311.pyc deleted file mode 100644 index d1bc9da..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/internal_api.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/internal_api.cpython-314.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/internal_api.cpython-314.pyc deleted file mode 100644 index 3853a07..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/internal_api.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/managed_loggers.cpython-311.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/managed_loggers.cpython-311.pyc deleted file mode 100644 index 48c2236..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/managed_loggers.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/managed_loggers.cpython-314.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/managed_loggers.cpython-314.pyc deleted file mode 100644 index eac6d86..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/managed_loggers.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/stream_manager.cpython-311.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/stream_manager.cpython-311.pyc deleted file mode 100644 index 2bce4f4..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/stream_manager.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/__pycache__/stream_manager.cpython-314.pyc b/WrenchCL/_Internal/Logging/Api/__pycache__/stream_manager.cpython-314.pyc deleted file mode 100644 index 7619332..0000000 Binary files a/WrenchCL/_Internal/Logging/Api/__pycache__/stream_manager.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/Api/base_logger.py b/WrenchCL/_Internal/Logging/Api/base_logger.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Api/base_logger.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/Api/internal_api.py b/WrenchCL/_Internal/Logging/Api/internal_api.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Api/internal_api.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/Api/managed_loggers.py b/WrenchCL/_Internal/Logging/Api/managed_loggers.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Api/managed_loggers.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/Api/stream_manager.py b/WrenchCL/_Internal/Logging/Api/stream_manager.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Api/stream_manager.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/Api/usage_example.py b/WrenchCL/_Internal/Logging/Api/usage_example.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Api/usage_example.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/ColorService.py b/WrenchCL/_Internal/Logging/ColorService.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/ColorService.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/ContextFilter.py b/WrenchCL/_Internal/Logging/ContextFilter.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/ContextFilter.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/DataClasses.py b/WrenchCL/_Internal/Logging/DataClasses.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/DataClasses.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/DatadogTraceInjectionFilter.py b/WrenchCL/_Internal/Logging/DatadogTraceInjectionFilter.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/DatadogTraceInjectionFilter.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/Formatters.py b/WrenchCL/_Internal/Logging/Formatters.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/Formatters.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/LogManagers.py b/WrenchCL/_Internal/Logging/LogManagers.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/LogManagers.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/LoggerConfigState.py b/WrenchCL/_Internal/Logging/LoggerConfigState.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/LoggerConfigState.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/MarkupHandlers.py b/WrenchCL/_Internal/Logging/MarkupHandlers.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/MarkupHandlers.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/MessageProcessors.py b/WrenchCL/_Internal/Logging/MessageProcessors.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/MessageProcessors.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/__init__.py b/WrenchCL/_Internal/Logging/__init__.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/Logging/__pycache__/ColorService.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/ColorService.cpython-311.pyc deleted file mode 100644 index 7c04795..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/ColorService.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/ColorService.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/ColorService.cpython-314.pyc deleted file mode 100644 index 93c2210..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/ColorService.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/ContextFilter.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/ContextFilter.cpython-311.pyc deleted file mode 100644 index 81d8745..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/ContextFilter.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/ContextFilter.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/ContextFilter.cpython-314.pyc deleted file mode 100644 index a2fe4ef..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/ContextFilter.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/DataClasses.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/DataClasses.cpython-311.pyc deleted file mode 100644 index 0726a12..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/DataClasses.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/DataClasses.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/DataClasses.cpython-314.pyc deleted file mode 100644 index ce6e0df..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/DataClasses.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/DatadogTraceInjectionFilter.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/DatadogTraceInjectionFilter.cpython-311.pyc deleted file mode 100644 index 38c1a2b..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/DatadogTraceInjectionFilter.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/Formatters.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/Formatters.cpython-311.pyc deleted file mode 100644 index a4c2873..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/Formatters.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/Formatters.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/Formatters.cpython-314.pyc deleted file mode 100644 index 222ea5d..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/Formatters.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/LogManagers.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/LogManagers.cpython-311.pyc deleted file mode 100644 index 2792895..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/LogManagers.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/LogManagers.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/LogManagers.cpython-314.pyc deleted file mode 100644 index 4ed6cdc..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/LogManagers.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/LoggerConfigState.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/LoggerConfigState.cpython-311.pyc deleted file mode 100644 index a4ce1e7..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/LoggerConfigState.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/LoggerConfigState.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/LoggerConfigState.cpython-314.pyc deleted file mode 100644 index 75386f7..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/LoggerConfigState.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/MarkupHandlers.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/MarkupHandlers.cpython-311.pyc deleted file mode 100644 index cddc90b..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/MarkupHandlers.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/MarkupHandlers.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/MarkupHandlers.cpython-314.pyc deleted file mode 100644 index 758e9d5..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/MarkupHandlers.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/MessageProcessors.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/MessageProcessors.cpython-311.pyc deleted file mode 100644 index 1b4c1a2..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/MessageProcessors.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/MessageProcessors.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/MessageProcessors.cpython-314.pyc deleted file mode 100644 index 3208b57..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/MessageProcessors.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/__init__.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 0ce29cf..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/__init__.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index f977aba..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/logging_utils.cpython-311.pyc b/WrenchCL/_Internal/Logging/__pycache__/logging_utils.cpython-311.pyc deleted file mode 100644 index a62c862..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/logging_utils.cpython-311.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/__pycache__/logging_utils.cpython-314.pyc b/WrenchCL/_Internal/Logging/__pycache__/logging_utils.cpython-314.pyc deleted file mode 100644 index 84313ed..0000000 Binary files a/WrenchCL/_Internal/Logging/__pycache__/logging_utils.cpython-314.pyc and /dev/null differ diff --git a/WrenchCL/_Internal/Logging/logging_utils.py b/WrenchCL/_Internal/Logging/logging_utils.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/Logging/logging_utils.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger diff --git a/WrenchCL/_Internal/_ExceptionSuggestor.py b/WrenchCL/_Internal/_ExceptionSuggestor.py deleted file mode 100644 index b161ca8..0000000 --- a/WrenchCL/_Internal/_ExceptionSuggestor.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2025. -# Author: Willem van der Schans. -# Licensed under the MIT License (https://opensource.org/license/mit). - -import inspect -import re -from difflib import get_close_matches -from typing import Optional - - -class _ExceptionSuggestor: - @staticmethod - def suggest_similar( - error: BaseException, frame_depth=20, n_suggestions=1, cutoff=0.6 - ) -> Optional[str]: - if not isinstance(error, BaseException): - return None - error_msg = error.args[0] - if error.__class__.__name__.lower() not in error_msg.lower(): - error_msg = f" {error.__class__.__name__}: {error_msg}" - else: - error_msg = f" {error_msg}" - - obj_match = re.search(r"'(\w+)' object has no attribute", error_msg) - key_match = re.search(r"has no attribute '(\w+)'", error_msg) - - if not key_match: - return error_msg - - source_obj = obj_match.group(1) if obj_match else None - missing_attr = key_match.group(1) - try: - for frame in reversed(inspect.stack()[:frame_depth]): - for var in frame.frame.f_locals.values(): - if not hasattr(var, "__class__"): - continue - if var.__class__.__name__ == source_obj: - keys = [k for k in dir(var) if not k.startswith("__")] - matches = get_close_matches( - missing_attr, keys, n=n_suggestions, cutoff=cutoff - ) - if matches: - return f"{error_msg}\n Did you mean: {', '.join(matches)}?\n" - except Exception: - pass - return error_msg diff --git a/WrenchCL/_Internal/_custom_types.py b/WrenchCL/_Internal/_custom_types.py deleted file mode 100644 index ff712ac..0000000 --- a/WrenchCL/_Internal/_custom_types.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2025. -# Author: Willem van der Schans. -# Licensed under the MIT License (https://opensource.org/license/mit). -from enum import Enum - - -class StdStreamMode(str, Enum): - NONE = "none" - STDERR = "stderr" - BOTH = "both" diff --git a/WrenchCL/_Internal/cLogger.py b/WrenchCL/_Internal/cLogger.py deleted file mode 100644 index 841360d..0000000 --- a/WrenchCL/_Internal/cLogger.py +++ /dev/null @@ -1 +0,0 @@ -# Removed in WrenchCL v6 — replaced by WrenchCL._Internal.WrenchLogger