exonware-xwsystem 0.0.1.408__py3-none-any.whl → 0.0.1.410__py3-none-any.whl

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.
Files changed (256) hide show
  1. exonware/__init__.py +2 -2
  2. exonware/conf.py +10 -20
  3. exonware/xwsystem/__init__.py +5 -15
  4. exonware/xwsystem/caching/__init__.py +1 -1
  5. exonware/xwsystem/caching/base.py +15 -15
  6. exonware/xwsystem/caching/bloom_cache.py +4 -4
  7. exonware/xwsystem/caching/cache_manager.py +2 -2
  8. exonware/xwsystem/caching/conditional.py +3 -3
  9. exonware/xwsystem/caching/contracts.py +12 -12
  10. exonware/xwsystem/caching/decorators.py +1 -1
  11. exonware/xwsystem/caching/defs.py +1 -1
  12. exonware/xwsystem/caching/disk_cache.py +4 -4
  13. exonware/xwsystem/caching/distributed.py +1 -1
  14. exonware/xwsystem/caching/errors.py +1 -1
  15. exonware/xwsystem/caching/events.py +7 -7
  16. exonware/xwsystem/caching/eviction_strategies.py +9 -9
  17. exonware/xwsystem/caching/fluent.py +1 -1
  18. exonware/xwsystem/caching/integrity.py +1 -1
  19. exonware/xwsystem/caching/lfu_cache.py +23 -8
  20. exonware/xwsystem/caching/lfu_optimized.py +20 -20
  21. exonware/xwsystem/caching/lru_cache.py +13 -6
  22. exonware/xwsystem/caching/memory_bounded.py +7 -7
  23. exonware/xwsystem/caching/metrics_exporter.py +5 -5
  24. exonware/xwsystem/caching/observable_cache.py +1 -1
  25. exonware/xwsystem/caching/pluggable_cache.py +8 -8
  26. exonware/xwsystem/caching/rate_limiter.py +1 -1
  27. exonware/xwsystem/caching/read_through.py +5 -5
  28. exonware/xwsystem/caching/secure_cache.py +1 -1
  29. exonware/xwsystem/caching/serializable.py +2 -2
  30. exonware/xwsystem/caching/stats.py +7 -7
  31. exonware/xwsystem/caching/tagging.py +10 -10
  32. exonware/xwsystem/caching/ttl_cache.py +21 -6
  33. exonware/xwsystem/caching/two_tier_cache.py +5 -5
  34. exonware/xwsystem/caching/utils.py +3 -3
  35. exonware/xwsystem/caching/validation.py +1 -1
  36. exonware/xwsystem/caching/warming.py +8 -8
  37. exonware/xwsystem/caching/write_behind.py +4 -4
  38. exonware/xwsystem/cli/__init__.py +1 -1
  39. exonware/xwsystem/cli/args.py +10 -10
  40. exonware/xwsystem/cli/base.py +15 -15
  41. exonware/xwsystem/cli/colors.py +1 -1
  42. exonware/xwsystem/cli/console.py +1 -1
  43. exonware/xwsystem/cli/contracts.py +5 -5
  44. exonware/xwsystem/cli/defs.py +1 -1
  45. exonware/xwsystem/cli/errors.py +1 -1
  46. exonware/xwsystem/cli/progress.py +1 -1
  47. exonware/xwsystem/cli/prompts.py +1 -1
  48. exonware/xwsystem/cli/tables.py +7 -7
  49. exonware/xwsystem/config/__init__.py +1 -1
  50. exonware/xwsystem/config/base.py +13 -13
  51. exonware/xwsystem/config/contracts.py +22 -22
  52. exonware/xwsystem/config/defaults.py +2 -2
  53. exonware/xwsystem/config/defs.py +1 -1
  54. exonware/xwsystem/config/errors.py +1 -1
  55. exonware/xwsystem/config/logging.py +1 -1
  56. exonware/xwsystem/config/logging_setup.py +1 -1
  57. exonware/xwsystem/config/performance.py +7 -7
  58. exonware/xwsystem/config/performance_modes.py +20 -20
  59. exonware/xwsystem/config/version_manager.py +4 -4
  60. exonware/xwsystem/{http → http_client}/__init__.py +1 -1
  61. exonware/xwsystem/{http → http_client}/advanced_client.py +20 -20
  62. exonware/xwsystem/{http → http_client}/base.py +12 -12
  63. exonware/xwsystem/{http → http_client}/client.py +43 -43
  64. exonware/xwsystem/{http → http_client}/contracts.py +5 -5
  65. exonware/xwsystem/{http → http_client}/defs.py +2 -2
  66. exonware/xwsystem/{http → http_client}/errors.py +1 -1
  67. exonware/xwsystem/io/__init__.py +1 -1
  68. exonware/xwsystem/io/archive/__init__.py +1 -1
  69. exonware/xwsystem/io/archive/archive.py +5 -5
  70. exonware/xwsystem/io/archive/archive_files.py +8 -8
  71. exonware/xwsystem/io/archive/archivers.py +2 -2
  72. exonware/xwsystem/io/archive/base.py +15 -15
  73. exonware/xwsystem/io/archive/codec_integration.py +1 -1
  74. exonware/xwsystem/io/archive/compression.py +1 -1
  75. exonware/xwsystem/io/archive/formats/__init__.py +1 -1
  76. exonware/xwsystem/io/archive/formats/brotli_format.py +7 -7
  77. exonware/xwsystem/io/archive/formats/lz4_format.py +7 -7
  78. exonware/xwsystem/io/archive/formats/rar.py +7 -7
  79. exonware/xwsystem/io/archive/formats/sevenzip.py +7 -7
  80. exonware/xwsystem/io/archive/formats/squashfs_format.py +7 -7
  81. exonware/xwsystem/io/archive/formats/tar.py +8 -8
  82. exonware/xwsystem/io/archive/formats/wim_format.py +7 -7
  83. exonware/xwsystem/io/archive/formats/zip.py +8 -8
  84. exonware/xwsystem/io/archive/formats/zpaq_format.py +7 -7
  85. exonware/xwsystem/io/archive/formats/zstandard.py +7 -7
  86. exonware/xwsystem/io/base.py +17 -17
  87. exonware/xwsystem/io/codec/__init__.py +1 -1
  88. exonware/xwsystem/io/codec/base.py +260 -13
  89. exonware/xwsystem/io/codec/contracts.py +3 -6
  90. exonware/xwsystem/io/codec/registry.py +28 -28
  91. exonware/xwsystem/io/common/__init__.py +1 -1
  92. exonware/xwsystem/io/common/atomic.py +2 -2
  93. exonware/xwsystem/io/common/base.py +1 -1
  94. exonware/xwsystem/io/common/lock.py +1 -1
  95. exonware/xwsystem/io/common/watcher.py +4 -4
  96. exonware/xwsystem/io/contracts.py +34 -39
  97. exonware/xwsystem/io/defs.py +2 -2
  98. exonware/xwsystem/io/errors.py +32 -3
  99. exonware/xwsystem/io/facade.py +3 -3
  100. exonware/xwsystem/io/file/__init__.py +1 -1
  101. exonware/xwsystem/io/file/base.py +2 -2
  102. exonware/xwsystem/io/file/conversion.py +1 -1
  103. exonware/xwsystem/io/file/file.py +3 -3
  104. exonware/xwsystem/io/file/paged_source.py +1 -1
  105. exonware/xwsystem/io/file/paging/__init__.py +1 -1
  106. exonware/xwsystem/io/file/paging/byte_paging.py +1 -1
  107. exonware/xwsystem/io/file/paging/line_paging.py +1 -1
  108. exonware/xwsystem/io/file/paging/record_paging.py +1 -1
  109. exonware/xwsystem/io/file/paging/registry.py +4 -4
  110. exonware/xwsystem/io/file/source.py +3 -3
  111. exonware/xwsystem/io/filesystem/__init__.py +1 -1
  112. exonware/xwsystem/io/filesystem/base.py +1 -1
  113. exonware/xwsystem/io/filesystem/local.py +1 -1
  114. exonware/xwsystem/io/folder/__init__.py +1 -1
  115. exonware/xwsystem/io/folder/base.py +2 -2
  116. exonware/xwsystem/io/folder/folder.py +5 -5
  117. exonware/xwsystem/io/serialization/__init__.py +1 -1
  118. exonware/xwsystem/io/serialization/auto_serializer.py +3 -3
  119. exonware/xwsystem/io/serialization/base.py +84 -35
  120. exonware/xwsystem/io/serialization/contracts.py +6 -4
  121. exonware/xwsystem/io/serialization/defs.py +1 -1
  122. exonware/xwsystem/io/serialization/errors.py +1 -1
  123. exonware/xwsystem/io/serialization/flyweight.py +18 -18
  124. exonware/xwsystem/io/serialization/format_detector.py +11 -11
  125. exonware/xwsystem/io/serialization/formats/__init__.py +1 -1
  126. exonware/xwsystem/io/serialization/formats/binary/bson.py +1 -1
  127. exonware/xwsystem/io/serialization/formats/binary/cbor.py +1 -1
  128. exonware/xwsystem/io/serialization/formats/binary/marshal.py +1 -1
  129. exonware/xwsystem/io/serialization/formats/binary/msgpack.py +1 -1
  130. exonware/xwsystem/io/serialization/formats/binary/pickle.py +1 -1
  131. exonware/xwsystem/io/serialization/formats/binary/plistlib.py +1 -1
  132. exonware/xwsystem/io/serialization/formats/database/dbm.py +1 -1
  133. exonware/xwsystem/io/serialization/formats/database/shelve.py +1 -1
  134. exonware/xwsystem/io/serialization/formats/database/sqlite3.py +1 -1
  135. exonware/xwsystem/io/serialization/formats/text/configparser.py +2 -2
  136. exonware/xwsystem/io/serialization/formats/text/csv.py +2 -2
  137. exonware/xwsystem/io/serialization/formats/text/formdata.py +2 -2
  138. exonware/xwsystem/io/serialization/formats/text/json.py +23 -5
  139. exonware/xwsystem/io/serialization/formats/text/json5.py +93 -10
  140. exonware/xwsystem/io/serialization/formats/text/jsonlines.py +4 -4
  141. exonware/xwsystem/io/serialization/formats/text/multipart.py +2 -2
  142. exonware/xwsystem/io/serialization/formats/text/toml.py +47 -2
  143. exonware/xwsystem/io/serialization/formats/text/xml.py +444 -69
  144. exonware/xwsystem/io/serialization/formats/text/yaml.py +1 -1
  145. exonware/xwsystem/io/serialization/registry.py +5 -5
  146. exonware/xwsystem/io/serialization/serializer.py +11 -11
  147. exonware/xwsystem/io/serialization/utils/__init__.py +1 -1
  148. exonware/xwsystem/io/serialization/utils/path_ops.py +3 -3
  149. exonware/xwsystem/io/stream/__init__.py +1 -1
  150. exonware/xwsystem/io/stream/async_operations.py +3 -3
  151. exonware/xwsystem/io/stream/base.py +3 -7
  152. exonware/xwsystem/io/stream/codec_io.py +4 -7
  153. exonware/xwsystem/ipc/async_fabric.py +7 -7
  154. exonware/xwsystem/ipc/base.py +8 -8
  155. exonware/xwsystem/ipc/contracts.py +4 -4
  156. exonware/xwsystem/ipc/defs.py +1 -1
  157. exonware/xwsystem/ipc/errors.py +1 -1
  158. exonware/xwsystem/ipc/message_queue.py +4 -6
  159. exonware/xwsystem/ipc/process_manager.py +7 -7
  160. exonware/xwsystem/ipc/process_pool.py +8 -8
  161. exonware/xwsystem/ipc/shared_memory.py +5 -5
  162. exonware/xwsystem/monitoring/base.py +32 -32
  163. exonware/xwsystem/monitoring/contracts.py +27 -27
  164. exonware/xwsystem/monitoring/defs.py +1 -1
  165. exonware/xwsystem/monitoring/error_recovery.py +15 -15
  166. exonware/xwsystem/monitoring/errors.py +1 -1
  167. exonware/xwsystem/monitoring/memory_monitor.py +11 -11
  168. exonware/xwsystem/monitoring/metrics.py +8 -8
  169. exonware/xwsystem/monitoring/performance_manager_generic.py +19 -19
  170. exonware/xwsystem/monitoring/performance_monitor.py +11 -11
  171. exonware/xwsystem/monitoring/performance_validator.py +20 -20
  172. exonware/xwsystem/monitoring/system_monitor.py +16 -16
  173. exonware/xwsystem/monitoring/tracing.py +19 -19
  174. exonware/xwsystem/monitoring/tracker.py +7 -7
  175. exonware/xwsystem/operations/__init__.py +5 -5
  176. exonware/xwsystem/operations/base.py +3 -3
  177. exonware/xwsystem/operations/contracts.py +3 -3
  178. exonware/xwsystem/operations/defs.py +5 -5
  179. exonware/xwsystem/operations/diff.py +5 -5
  180. exonware/xwsystem/operations/merge.py +2 -2
  181. exonware/xwsystem/operations/patch.py +5 -5
  182. exonware/xwsystem/patterns/base.py +3 -3
  183. exonware/xwsystem/patterns/context_manager.py +6 -6
  184. exonware/xwsystem/patterns/contracts.py +22 -24
  185. exonware/xwsystem/patterns/defs.py +1 -1
  186. exonware/xwsystem/patterns/dynamic_facade.py +5 -5
  187. exonware/xwsystem/patterns/errors.py +7 -7
  188. exonware/xwsystem/patterns/handler_factory.py +11 -10
  189. exonware/xwsystem/patterns/import_registry.py +22 -22
  190. exonware/xwsystem/patterns/object_pool.py +11 -10
  191. exonware/xwsystem/patterns/registry.py +44 -31
  192. exonware/xwsystem/plugins/__init__.py +1 -1
  193. exonware/xwsystem/plugins/base.py +23 -23
  194. exonware/xwsystem/plugins/contracts.py +26 -26
  195. exonware/xwsystem/plugins/defs.py +1 -1
  196. exonware/xwsystem/plugins/errors.py +7 -7
  197. exonware/xwsystem/runtime/__init__.py +1 -1
  198. exonware/xwsystem/runtime/base.py +40 -40
  199. exonware/xwsystem/runtime/contracts.py +8 -8
  200. exonware/xwsystem/runtime/defs.py +1 -1
  201. exonware/xwsystem/runtime/env.py +8 -8
  202. exonware/xwsystem/runtime/errors.py +1 -1
  203. exonware/xwsystem/runtime/reflection.py +13 -13
  204. exonware/xwsystem/security/auth.py +47 -15
  205. exonware/xwsystem/security/base.py +16 -16
  206. exonware/xwsystem/security/contracts.py +30 -30
  207. exonware/xwsystem/security/crypto.py +7 -7
  208. exonware/xwsystem/security/defs.py +1 -1
  209. exonware/xwsystem/security/errors.py +1 -1
  210. exonware/xwsystem/security/hazmat.py +6 -6
  211. exonware/xwsystem/security/path_validator.py +1 -1
  212. exonware/xwsystem/shared/__init__.py +1 -1
  213. exonware/xwsystem/shared/base.py +14 -14
  214. exonware/xwsystem/shared/contracts.py +6 -6
  215. exonware/xwsystem/shared/defs.py +1 -1
  216. exonware/xwsystem/shared/errors.py +1 -1
  217. exonware/xwsystem/structures/base.py +28 -28
  218. exonware/xwsystem/structures/circular_detector.py +15 -15
  219. exonware/xwsystem/structures/contracts.py +9 -9
  220. exonware/xwsystem/structures/defs.py +1 -1
  221. exonware/xwsystem/structures/errors.py +1 -1
  222. exonware/xwsystem/structures/tree_walker.py +8 -8
  223. exonware/xwsystem/threading/async_primitives.py +6 -6
  224. exonware/xwsystem/threading/base.py +18 -18
  225. exonware/xwsystem/threading/contracts.py +13 -13
  226. exonware/xwsystem/threading/defs.py +1 -1
  227. exonware/xwsystem/threading/errors.py +1 -1
  228. exonware/xwsystem/threading/safe_factory.py +10 -9
  229. exonware/xwsystem/utils/base.py +33 -33
  230. exonware/xwsystem/utils/contracts.py +9 -9
  231. exonware/xwsystem/utils/dt/__init__.py +1 -1
  232. exonware/xwsystem/utils/dt/base.py +5 -5
  233. exonware/xwsystem/utils/dt/contracts.py +2 -2
  234. exonware/xwsystem/utils/dt/defs.py +1 -1
  235. exonware/xwsystem/utils/dt/errors.py +1 -1
  236. exonware/xwsystem/utils/dt/formatting.py +3 -3
  237. exonware/xwsystem/utils/dt/humanize.py +1 -1
  238. exonware/xwsystem/utils/dt/parsing.py +2 -2
  239. exonware/xwsystem/utils/dt/timezone_utils.py +5 -5
  240. exonware/xwsystem/utils/errors.py +1 -1
  241. exonware/xwsystem/utils/test_runner.py +6 -6
  242. exonware/xwsystem/utils/utils_contracts.py +1 -1
  243. exonware/xwsystem/validation/__init__.py +1 -1
  244. exonware/xwsystem/validation/base.py +39 -39
  245. exonware/xwsystem/validation/contracts.py +8 -8
  246. exonware/xwsystem/validation/declarative.py +9 -9
  247. exonware/xwsystem/validation/defs.py +1 -1
  248. exonware/xwsystem/validation/errors.py +1 -1
  249. exonware/xwsystem/validation/fluent_validator.py +8 -8
  250. exonware/xwsystem/version.py +2 -2
  251. {exonware_xwsystem-0.0.1.408.dist-info → exonware_xwsystem-0.0.1.410.dist-info}/METADATA +9 -11
  252. exonware_xwsystem-0.0.1.410.dist-info/RECORD +273 -0
  253. {exonware_xwsystem-0.0.1.408.dist-info → exonware_xwsystem-0.0.1.410.dist-info}/WHEEL +1 -1
  254. exonware/xwsystem/lazy_bootstrap.py +0 -79
  255. exonware_xwsystem-0.0.1.408.dist-info/RECORD +0 -274
  256. {exonware_xwsystem-0.0.1.408.dist-info → exonware_xwsystem-0.0.1.410.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,7 @@
2
2
  Company: eXonware.com
3
3
  Author: Eng. Muhammad AlShehri
4
4
  Email: connect@exonware.com
5
- Version: 0.0.1.408
5
+ Version: 0.0.1.410
6
6
  Generation Date: September 05, 2025
7
7
 
8
8
  Distributed Tracing Integration for Enterprise Observability
@@ -19,7 +19,7 @@ import time
19
19
  import uuid
20
20
  from contextlib import asynccontextmanager, contextmanager
21
21
  from dataclasses import dataclass, field
22
- from typing import Any, AsyncContextManager, ContextManager, Dict, Optional, Union
22
+ from typing import Any, AsyncContextManager, ContextManager, Optional, Union
23
23
  from .base import ATracingProvider
24
24
  from .errors import TracingError
25
25
  from .defs import SpanKind
@@ -40,7 +40,7 @@ class SpanContext:
40
40
  trace_id: str
41
41
  span_id: str
42
42
  parent_span_id: Optional[str] = None
43
- baggage: Dict[str, Any] = field(default_factory=dict)
43
+ baggage: dict[str, Any] = field(default_factory=dict)
44
44
 
45
45
 
46
46
  @dataclass
@@ -77,7 +77,7 @@ class OpenTelemetryTracer(ATracingProvider):
77
77
  # OpenTelemetry is now required
78
78
 
79
79
  self.service_name = service_name
80
- self._spans: Dict[str, Any] = {}
80
+ self._spans: dict[str, Any] = {}
81
81
 
82
82
  # Set up tracer provider
83
83
  trace.set_tracer_provider(TracerProvider())
@@ -126,7 +126,7 @@ class OpenTelemetryTracer(ATracingProvider):
126
126
  name: str,
127
127
  kind: SpanKind = SpanKind.INTERNAL,
128
128
  parent: Optional[SpanContext] = None,
129
- attributes: Optional[Dict[str, Any]] = None
129
+ attributes: Optional[dict[str, Any]] = None
130
130
  ) -> SpanContext:
131
131
  """Start a new span."""
132
132
  span = self.tracer.start_span(name)
@@ -163,7 +163,7 @@ class OpenTelemetryTracer(ATracingProvider):
163
163
  if span.span_id in self._spans:
164
164
  self._spans[span.span_id].set_attribute(key, value)
165
165
 
166
- def add_span_event(self, span: SpanContext, name: str, attributes: Optional[Dict[str, Any]] = None) -> None:
166
+ def add_span_event(self, span: SpanContext, name: str, attributes: Optional[dict[str, Any]] = None) -> None:
167
167
  """Add event to span."""
168
168
  if span.span_id in self._spans:
169
169
  self._spans[span.span_id].add_event(name, attributes or {})
@@ -177,14 +177,14 @@ class JaegerTracer(ATracingProvider):
177
177
  self.service_name = service_name
178
178
  self.agent_host = agent_host
179
179
  self.agent_port = agent_port
180
- self._spans: Dict[str, Dict[str, Any]] = {}
180
+ self._spans: dict[str, dict[str, Any]] = {}
181
181
 
182
182
  def start_span(
183
183
  self,
184
184
  name: str,
185
185
  kind: SpanKind = SpanKind.INTERNAL,
186
186
  parent: Optional[SpanContext] = None,
187
- attributes: Optional[Dict[str, Any]] = None
187
+ attributes: Optional[dict[str, Any]] = None
188
188
  ) -> SpanContext:
189
189
  """Start a new span."""
190
190
  span_id = str(uuid.uuid4())
@@ -225,7 +225,7 @@ class JaegerTracer(ATracingProvider):
225
225
  if span.span_id in self._spans:
226
226
  self._spans[span.span_id]['attributes'][key] = value
227
227
 
228
- def add_span_event(self, span: SpanContext, name: str, attributes: Optional[Dict[str, Any]] = None) -> None:
228
+ def add_span_event(self, span: SpanContext, name: str, attributes: Optional[dict[str, Any]] = None) -> None:
229
229
  """Add event to span."""
230
230
  if span.span_id in self._spans:
231
231
  self._spans[span.span_id]['events'].append({
@@ -272,7 +272,7 @@ class TracingManager:
272
272
  self,
273
273
  name: str,
274
274
  kind: SpanKind = SpanKind.INTERNAL,
275
- attributes: Optional[Dict[str, Any]] = None
275
+ attributes: Optional[dict[str, Any]] = None
276
276
  ) -> ContextManager[SpanContext]:
277
277
  """Context manager for tracing an operation."""
278
278
  span = self.provider.start_span(name, kind=kind, attributes=attributes)
@@ -290,7 +290,7 @@ class TracingManager:
290
290
  self,
291
291
  name: str,
292
292
  kind: SpanKind = SpanKind.INTERNAL,
293
- attributes: Optional[Dict[str, Any]] = None
293
+ attributes: Optional[dict[str, Any]] = None
294
294
  ) -> AsyncContextManager[SpanContext]:
295
295
  """Async context manager for tracing an operation."""
296
296
  span = self.provider.start_span(name, kind=kind, attributes=attributes)
@@ -309,7 +309,7 @@ class TracingManager:
309
309
  # This would add to the root span in a real implementation
310
310
  logger.debug(f"Trace attribute: {key}={value}")
311
311
 
312
- def add_trace_event(self, name: str, attributes: Optional[Dict[str, Any]] = None) -> None:
312
+ def add_trace_event(self, name: str, attributes: Optional[dict[str, Any]] = None) -> None:
313
313
  """Add event to current trace."""
314
314
  if self._current_trace:
315
315
  # This would add to the current span in a real implementation
@@ -324,7 +324,7 @@ class TracingManager:
324
324
  # Placeholder - would return active span in full implementation
325
325
  return None
326
326
 
327
- def start_span(self, name: str, parent: Optional[SpanContext] = None, attributes: Optional[Dict[str, Any]] = None) -> SpanContext:
327
+ def start_span(self, name: str, parent: Optional[SpanContext] = None, attributes: Optional[dict[str, Any]] = None) -> SpanContext:
328
328
  """Start a new span."""
329
329
  return self.provider.start_span(name, parent=parent, attributes=attributes)
330
330
 
@@ -336,7 +336,7 @@ class TracingManager:
336
336
  """Add attribute to span."""
337
337
  self.provider.add_span_attribute(span, key, value)
338
338
 
339
- def add_span_event(self, span: SpanContext, name: str, attributes: Optional[Dict[str, Any]] = None) -> None:
339
+ def add_span_event(self, span: SpanContext, name: str, attributes: Optional[dict[str, Any]] = None) -> None:
340
340
  """Add event to span."""
341
341
  self.provider.add_span_event(span, name, attributes)
342
342
 
@@ -349,7 +349,7 @@ class NoOpTracingProvider(ATracingProvider):
349
349
  name: str,
350
350
  kind: SpanKind = SpanKind.INTERNAL,
351
351
  parent: Optional[SpanContext] = None,
352
- attributes: Optional[Dict[str, Any]] = None
352
+ attributes: Optional[dict[str, Any]] = None
353
353
  ) -> SpanContext:
354
354
  """Start a no-op span."""
355
355
  return SpanContext(
@@ -365,7 +365,7 @@ class NoOpTracingProvider(ATracingProvider):
365
365
  """Add attribute to no-op span."""
366
366
  pass
367
367
 
368
- def add_span_event(self, span: SpanContext, name: str, attributes: Optional[Dict[str, Any]] = None) -> None:
368
+ def add_span_event(self, span: SpanContext, name: str, attributes: Optional[dict[str, Any]] = None) -> None:
369
369
  """Add event to no-op span."""
370
370
  pass
371
371
 
@@ -393,11 +393,11 @@ class DistributedTracing:
393
393
  if provider:
394
394
  self.manager.set_provider(provider)
395
395
 
396
- def start_trace(self, name: str, attributes: Optional[Dict[str, Any]] = None) -> TraceContext:
396
+ def start_trace(self, name: str, attributes: Optional[dict[str, Any]] = None) -> TraceContext:
397
397
  """Start a new trace."""
398
398
  return self.manager.start_trace(name, **(attributes or {}))
399
399
 
400
- def start_span(self, name: str, parent: Optional[SpanContext] = None, attributes: Optional[Dict[str, Any]] = None) -> SpanContext:
400
+ def start_span(self, name: str, parent: Optional[SpanContext] = None, attributes: Optional[dict[str, Any]] = None) -> SpanContext:
401
401
  """Start a new span."""
402
402
  return self.manager.start_span(name, parent, attributes)
403
403
 
@@ -409,7 +409,7 @@ class DistributedTracing:
409
409
  """Add attribute to span."""
410
410
  self.manager.add_span_attribute(span, key, value)
411
411
 
412
- def add_span_event(self, span: SpanContext, name: str, attributes: Optional[Dict[str, Any]] = None) -> None:
412
+ def add_span_event(self, span: SpanContext, name: str, attributes: Optional[dict[str, Any]] = None) -> None:
413
413
  """Add event to span."""
414
414
  self.manager.add_span_event(span, name, attributes)
415
415
 
@@ -3,7 +3,7 @@
3
3
  Company: eXonware.com
4
4
  Author: Eng. Muhammad AlShehri
5
5
  Email: connect@exonware.com
6
- Version: 0.0.1.408
6
+ Version: 0.0.1.410
7
7
  Generation Date: October 26, 2025
8
8
 
9
9
  Operation tracker for monitoring operations with context management.
@@ -12,7 +12,7 @@ Operation tracker for monitoring operations with context management.
12
12
  import threading
13
13
  import time
14
14
  from contextlib import contextmanager
15
- from typing import Any, Dict, List, Optional, Callable
15
+ from typing import Any, Optional, Callable
16
16
  from .metrics import OperationMetrics, MetricSnapshot
17
17
  from ..config.logging_setup import get_logger
18
18
 
@@ -41,8 +41,8 @@ class OperationTracker:
41
41
  """
42
42
  self.max_recent_samples = max_recent_samples
43
43
  self._lock = threading.RLock()
44
- self._metrics: Dict[str, OperationMetrics] = {}
45
- self._callbacks: List[Callable[[str, float, bool], None]] = []
44
+ self._metrics: dict[str, OperationMetrics] = {}
45
+ self._callbacks: list[Callable[[str, float, bool], None]] = []
46
46
 
47
47
  def track_operation(
48
48
  self,
@@ -111,12 +111,12 @@ class OperationTracker:
111
111
  with self._lock:
112
112
  return self._metrics.get(operation_name)
113
113
 
114
- def get_all_stats(self) -> Dict[str, OperationMetrics]:
114
+ def get_all_stats(self) -> dict[str, OperationMetrics]:
115
115
  """Get statistics for all operations."""
116
116
  with self._lock:
117
117
  return self._metrics.copy()
118
118
 
119
- def get_summary_stats(self) -> Dict[str, Any]:
119
+ def get_summary_stats(self) -> dict[str, Any]:
120
120
  """Get summary statistics across all operations."""
121
121
  with self._lock:
122
122
  if not self._metrics:
@@ -142,7 +142,7 @@ class OperationTracker:
142
142
  'error_rate': total_errors / max(1, total_calls),
143
143
  }
144
144
 
145
- def get_top_operations(self, limit: int = 10, sort_by: str = 'total_calls') -> List[Dict[str, Any]]:
145
+ def get_top_operations(self, limit: int = 10, sort_by: str = 'total_calls') -> list[dict[str, Any]]:
146
146
  """
147
147
  Get top operations by specified metric.
148
148
 
@@ -3,13 +3,13 @@
3
3
  Company: eXonware.com
4
4
  Author: Eng. Muhammad AlShehri
5
5
  Email: connect@exonware.com
6
- Version: 0.0.1.408
6
+ Version: 0.0.1.410
7
7
  Generation Date: October 26, 2025
8
8
 
9
9
  Universal operations library for data manipulation.
10
10
  """
11
11
 
12
- from typing import Any, Dict, List, Optional, Union, Set
12
+ from typing import Any, Optional, Union
13
13
  from enum import Enum
14
14
  from dataclasses import dataclass
15
15
  from ..config.logging_setup import get_logger
@@ -46,9 +46,9 @@ class PatchOperation(Enum):
46
46
  @dataclass
47
47
  class DiffResult:
48
48
  """Result of a diff operation."""
49
- operations: List[Dict[str, Any]]
49
+ operations: list[dict[str, Any]]
50
50
  mode: DiffMode
51
- paths_changed: List[str]
51
+ paths_changed: list[str]
52
52
  total_changes: int
53
53
 
54
54
 
@@ -57,7 +57,7 @@ class PatchResult:
57
57
  """Result of a patch operation."""
58
58
  success: bool
59
59
  operations_applied: int
60
- errors: List[str]
60
+ errors: list[str]
61
61
  result: Any
62
62
 
63
63
 
@@ -3,14 +3,14 @@
3
3
  Company: eXonware.com
4
4
  Author: Eng. Muhammad AlShehri
5
5
  Email: connect@exonware.com
6
- Version: 0.0.1.408
6
+ Version: 0.0.1.410
7
7
  Generation Date: October 26, 2025
8
8
 
9
9
  Base classes and contracts for operations.
10
10
  """
11
11
 
12
12
  from abc import ABC, abstractmethod
13
- from typing import Any, Dict, List, Optional, Union
13
+ from typing import Any, Optional, Union
14
14
  from .defs import MergeStrategy, DiffMode, PatchOperation, DiffResult, PatchResult
15
15
 
16
16
 
@@ -68,7 +68,7 @@ class IPatchOperation(IOperation):
68
68
  """Interface for patch operations."""
69
69
 
70
70
  @abstractmethod
71
- def apply_patch(self, data: Any, operations: List[Dict[str, Any]]) -> PatchResult:
71
+ def apply_patch(self, data: Any, operations: list[dict[str, Any]]) -> PatchResult:
72
72
  """Apply patch operations to data."""
73
73
  pass
74
74
 
@@ -8,7 +8,7 @@ Operations Contracts
8
8
  Protocol definitions for data operations.
9
9
  """
10
10
 
11
- from typing import Any, Dict, List, Protocol, runtime_checkable
11
+ from typing import Any, Protocol, runtime_checkable
12
12
  from .defs import MergeStrategy, DiffMode
13
13
 
14
14
 
@@ -44,7 +44,7 @@ class IDiff(Protocol):
44
44
  old: Any,
45
45
  new: Any,
46
46
  mode: DiffMode = DiffMode.STANDARD
47
- ) -> List[Dict[str, Any]]:
47
+ ) -> list[dict[str, Any]]:
48
48
  """Generate diff between two data structures."""
49
49
  ...
50
50
 
@@ -56,7 +56,7 @@ class IPatch(Protocol):
56
56
  def patch(
57
57
  self,
58
58
  data: Any,
59
- operations: List[Dict[str, Any]]
59
+ operations: list[dict[str, Any]]
60
60
  ) -> Any:
61
61
  """Apply patch operations to data."""
62
62
  ...
@@ -5,7 +5,7 @@
5
5
  Company: eXonware.com
6
6
  Author: Eng. Muhammad AlShehri
7
7
  Email: connect@exonware.com
8
- Version: 0.0.1.408
8
+ Version: 0.0.1.410
9
9
  Generation Date: October 27, 2025
10
10
 
11
11
  Operations definitions and data structures.
@@ -13,7 +13,7 @@ Operations definitions and data structures.
13
13
 
14
14
  from enum import Enum
15
15
  from dataclasses import dataclass
16
- from typing import Any, Dict, List
16
+ from typing import Any
17
17
 
18
18
 
19
19
  class MergeStrategy(Enum):
@@ -45,9 +45,9 @@ class PatchOperation(Enum):
45
45
  @dataclass
46
46
  class DiffResult:
47
47
  """Result of a diff operation."""
48
- operations: List[Dict[str, Any]]
48
+ operations: list[dict[str, Any]]
49
49
  mode: DiffMode
50
- paths_changed: List[str]
50
+ paths_changed: list[str]
51
51
  total_changes: int
52
52
 
53
53
 
@@ -56,7 +56,7 @@ class PatchResult:
56
56
  """Result of a patch operation."""
57
57
  success: bool
58
58
  operations_applied: int
59
- errors: List[str]
59
+ errors: list[str]
60
60
  result: Any
61
61
 
62
62
 
@@ -5,14 +5,14 @@
5
5
  Company: eXonware.com
6
6
  Author: Eng. Muhammad AlShehri
7
7
  Email: connect@exonware.com
8
- Version: 0.0.1.408
8
+ Version: 0.0.1.410
9
9
  Generation Date: October 27, 2025
10
10
 
11
11
  Diff operations implementation.
12
12
  """
13
13
 
14
14
  import threading
15
- from typing import Any, Dict, List, Optional, Union
15
+ from typing import Any, Optional, Union
16
16
  from .base import IDiffOperation, DiffError
17
17
  from .defs import DiffMode, DiffResult
18
18
  from ..config.logging_setup import get_logger
@@ -76,7 +76,7 @@ class DiffOperation(IDiffOperation):
76
76
  raise DiffError(f"Diff operation failed: {e}", "diff")
77
77
 
78
78
  def _structural_diff(self, original: Any, modified: Any, path: str,
79
- operations: List, paths_changed: List) -> List:
79
+ operations: list, paths_changed: list) -> list:
80
80
  """Compare structure only (keys, types)."""
81
81
  # Compare types
82
82
  if type(original) != type(modified):
@@ -133,7 +133,7 @@ class DiffOperation(IDiffOperation):
133
133
  return operations
134
134
 
135
135
  def _content_diff(self, original: Any, modified: Any, path: str,
136
- operations: List, paths_changed: List) -> List:
136
+ operations: list, paths_changed: list) -> list:
137
137
  """Compare content only (values)."""
138
138
  if original != modified:
139
139
  operations.append({
@@ -148,7 +148,7 @@ class DiffOperation(IDiffOperation):
148
148
  return operations
149
149
 
150
150
  def _full_diff(self, original: Any, modified: Any, path: str,
151
- operations: List, paths_changed: List) -> List:
151
+ operations: list, paths_changed: list) -> list:
152
152
  """
153
153
  Compare both structure and content recursively.
154
154
 
@@ -3,14 +3,14 @@
3
3
  Company: eXonware.com
4
4
  Author: Eng. Muhammad AlShehri
5
5
  Email: connect@exonware.com
6
- Version: 0.0.1.408
6
+ Version: 0.0.1.410
7
7
  Generation Date: October 26, 2025
8
8
 
9
9
  Merge operations implementation.
10
10
  """
11
11
 
12
12
  import threading
13
- from typing import Any, Dict, List, Optional, Union, Set
13
+ from typing import Any, Optional, Union
14
14
  from .base import IMergeOperation, MergeError
15
15
  from .defs import MergeStrategy
16
16
  from ..config.logging_setup import get_logger
@@ -5,7 +5,7 @@
5
5
  Company: eXonware.com
6
6
  Author: Eng. Muhammad AlShehri
7
7
  Email: connect@exonware.com
8
- Version: 0.0.1.408
8
+ Version: 0.0.1.410
9
9
  Generation Date: October 27, 2025
10
10
 
11
11
  Patch operations implementation (RFC 6902 JSON Patch).
@@ -13,7 +13,7 @@ Patch operations implementation (RFC 6902 JSON Patch).
13
13
 
14
14
  import threading
15
15
  import copy
16
- from typing import Any, Dict, List, Optional, Union
16
+ from typing import Any, Optional, Union
17
17
  from .base import IPatchOperation, PatchError
18
18
  from .defs import PatchOperation, PatchResult
19
19
  from ..config.logging_setup import get_logger
@@ -36,7 +36,7 @@ class PatchOperationImpl(IPatchOperation):
36
36
 
37
37
  return self.apply_patch(data, operations)
38
38
 
39
- def apply_patch(self, data: Any, operations: List[Dict[str, Any]]) -> PatchResult:
39
+ def apply_patch(self, data: Any, operations: list[dict[str, Any]]) -> PatchResult:
40
40
  """
41
41
  Apply patch operations to data (RFC 6902 JSON Patch).
42
42
 
@@ -97,7 +97,7 @@ class PatchOperationImpl(IPatchOperation):
97
97
  except Exception as e:
98
98
  raise PatchError(f"Patch operation failed: {e}", "patch")
99
99
 
100
- def _parse_path(self, path: str) -> List[str]:
100
+ def _parse_path(self, path: str) -> list[str]:
101
101
  """Parse JSON Pointer path."""
102
102
  if path == "/":
103
103
  return []
@@ -218,7 +218,7 @@ class PatchOperationImpl(IPatchOperation):
218
218
 
219
219
 
220
220
  # Convenience function
221
- def apply_patch(data: Any, operations: List[Dict[str, Any]]) -> PatchResult:
221
+ def apply_patch(data: Any, operations: list[dict[str, Any]]) -> PatchResult:
222
222
  """
223
223
  Convenience function for patch operations.
224
224
 
@@ -3,14 +3,14 @@
3
3
  Company: eXonware.com
4
4
  Author: Eng. Muhammad AlShehri
5
5
  Email: connect@exonware.com
6
- Version: 0.0.1.408
6
+ Version: 0.0.1.410
7
7
  Generation Date: September 04, 2025
8
8
 
9
9
  Abstract base classes for XSystem patterns.
10
10
  """
11
11
 
12
12
  from abc import ABC, abstractmethod
13
- from typing import Any, List
13
+ from typing import Any
14
14
 
15
15
  from .contracts import IHandler, IPattern
16
16
 
@@ -83,7 +83,7 @@ class AHandler(IHandler[Any]):
83
83
  """
84
84
  return True
85
85
 
86
- def get_supported_formats(self) -> List[str]:
86
+ def get_supported_formats(self) -> list[str]:
87
87
  """
88
88
  Get list of formats this handler supports.
89
89
 
@@ -9,7 +9,7 @@ import contextlib
9
9
  import logging
10
10
  import threading
11
11
  from contextlib import ExitStack, contextmanager
12
- from typing import Any, ContextManager, Dict, Generator, List, Optional, Type, Union
12
+ from typing import Any, ContextManager, Generator, Optional, Type, Union
13
13
 
14
14
  logger = logging.getLogger(__name__)
15
15
 
@@ -273,8 +273,8 @@ class MultiContextManager:
273
273
 
274
274
  def __init__(self) -> None:
275
275
  """Initialize empty multi-context manager."""
276
- self.contexts: List[ContextManager] = []
277
- self.entered_contexts: List[Any] = []
276
+ self.contexts: list[ContextManager] = []
277
+ self.entered_contexts: list[Any] = []
278
278
  self.stack: Optional[ExitStack] = None
279
279
 
280
280
  def add_context(self, context: ContextManager):
@@ -283,7 +283,7 @@ class MultiContextManager:
283
283
  raise RuntimeError("Cannot add contexts after entering")
284
284
  self.contexts.append(context)
285
285
 
286
- def __enter__(self) -> List[Any]:
286
+ def __enter__(self) -> list[Any]:
287
287
  """Enter all managed contexts."""
288
288
  self.stack = ExitStack()
289
289
  self.entered_contexts = []
@@ -327,7 +327,7 @@ class ContextManager:
327
327
  def __init__(self, name: str = "context"):
328
328
  """Initialize context manager."""
329
329
  self.name = name
330
- self._contexts: Dict[str, Any] = {}
330
+ self._contexts: dict[str, Any] = {}
331
331
  self._active = False
332
332
 
333
333
  def __enter__(self):
@@ -360,6 +360,6 @@ class ContextManager:
360
360
  """Check if context is active."""
361
361
  return self._active
362
362
 
363
- def get_all_contexts(self) -> Dict[str, Any]:
363
+ def get_all_contexts(self) -> dict[str, Any]:
364
364
  """Get all contexts."""
365
365
  return self._contexts.copy()