exonware-xwlazy 0.1.0.19__py3-none-any.whl → 0.1.0.20__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 (82) hide show
  1. exonware/__init__.py +6 -2
  2. exonware/xwlazy/__init__.py +0 -1
  3. exonware/xwlazy/common/__init__.py +1 -1
  4. exonware/xwlazy/common/base.py +1 -3
  5. exonware/xwlazy/common/cache.py +1 -3
  6. exonware/xwlazy/common/logger.py +1 -12
  7. exonware/xwlazy/common/services/dependency_mapper.py +0 -2
  8. exonware/xwlazy/common/services/install_async_utils.py +1 -5
  9. exonware/xwlazy/common/services/install_cache_utils.py +1 -13
  10. exonware/xwlazy/common/services/keyword_detection.py +0 -9
  11. exonware/xwlazy/common/services/spec_cache.py +1 -9
  12. exonware/xwlazy/common/services/state_manager.py +0 -2
  13. exonware/xwlazy/common/strategies/__init__.py +1 -1
  14. exonware/xwlazy/common/strategies/caching_dict.py +1 -2
  15. exonware/xwlazy/common/strategies/caching_installation.py +1 -2
  16. exonware/xwlazy/common/strategies/caching_lfu.py +1 -2
  17. exonware/xwlazy/common/strategies/caching_lru.py +1 -2
  18. exonware/xwlazy/common/strategies/caching_multitier.py +1 -2
  19. exonware/xwlazy/common/strategies/caching_ttl.py +1 -2
  20. exonware/xwlazy/config.py +1 -3
  21. exonware/xwlazy/contracts.py +1 -15
  22. exonware/xwlazy/defs.py +0 -19
  23. exonware/xwlazy/errors.py +1 -9
  24. exonware/xwlazy/facade.py +1 -59
  25. exonware/xwlazy/module/base.py +1 -5
  26. exonware/xwlazy/module/data.py +1 -1
  27. exonware/xwlazy/module/facade.py +0 -1
  28. exonware/xwlazy/module/importer_engine.py +1 -45
  29. exonware/xwlazy/module/strategies/__init__.py +1 -1
  30. exonware/xwlazy/module/strategies/module_helper_lazy.py +1 -2
  31. exonware/xwlazy/module/strategies/module_helper_simple.py +1 -2
  32. exonware/xwlazy/module/strategies/module_manager_advanced.py +1 -2
  33. exonware/xwlazy/module/strategies/module_manager_simple.py +1 -2
  34. exonware/xwlazy/package/base.py +1 -10
  35. exonware/xwlazy/package/conf.py +1 -8
  36. exonware/xwlazy/package/data.py +1 -1
  37. exonware/xwlazy/package/facade.py +0 -1
  38. exonware/xwlazy/package/services/async_install_handle.py +1 -3
  39. exonware/xwlazy/package/services/config_manager.py +0 -1
  40. exonware/xwlazy/package/services/discovery.py +1 -5
  41. exonware/xwlazy/package/services/host_packages.py +0 -4
  42. exonware/xwlazy/package/services/install_async.py +1 -2
  43. exonware/xwlazy/package/services/install_cache.py +1 -2
  44. exonware/xwlazy/package/services/install_interactive.py +1 -2
  45. exonware/xwlazy/package/services/install_policy.py +1 -3
  46. exonware/xwlazy/package/services/install_registry.py +1 -3
  47. exonware/xwlazy/package/services/install_result.py +1 -1
  48. exonware/xwlazy/package/services/install_sbom.py +1 -2
  49. exonware/xwlazy/package/services/install_utils.py +1 -5
  50. exonware/xwlazy/package/services/installer_engine.py +1 -3
  51. exonware/xwlazy/package/services/lazy_installer.py +1 -3
  52. exonware/xwlazy/package/services/manifest.py +0 -10
  53. exonware/xwlazy/package/services/strategy_registry.py +1 -3
  54. exonware/xwlazy/package/strategies/package_discovery_file.py +1 -2
  55. exonware/xwlazy/package/strategies/package_discovery_hybrid.py +1 -2
  56. exonware/xwlazy/package/strategies/package_discovery_manifest.py +1 -2
  57. exonware/xwlazy/package/strategies/package_execution_async.py +1 -2
  58. exonware/xwlazy/package/strategies/package_execution_cached.py +1 -2
  59. exonware/xwlazy/package/strategies/package_execution_pip.py +1 -2
  60. exonware/xwlazy/package/strategies/package_execution_wheel.py +1 -2
  61. exonware/xwlazy/package/strategies/package_mapping_discovery_first.py +1 -2
  62. exonware/xwlazy/package/strategies/package_mapping_hybrid.py +1 -2
  63. exonware/xwlazy/package/strategies/package_mapping_manifest_first.py +1 -2
  64. exonware/xwlazy/package/strategies/package_policy_allow_list.py +1 -2
  65. exonware/xwlazy/package/strategies/package_policy_deny_list.py +1 -2
  66. exonware/xwlazy/package/strategies/package_policy_permissive.py +1 -2
  67. exonware/xwlazy/package/strategies/package_timing_clean.py +1 -2
  68. exonware/xwlazy/package/strategies/package_timing_full.py +1 -2
  69. exonware/xwlazy/package/strategies/package_timing_smart.py +1 -2
  70. exonware/xwlazy/package/strategies/package_timing_temporary.py +1 -2
  71. exonware/xwlazy/runtime/adaptive_learner.py +1 -3
  72. exonware/xwlazy/runtime/base.py +1 -3
  73. exonware/xwlazy/runtime/facade.py +0 -1
  74. exonware/xwlazy/runtime/intelligent_selector.py +1 -4
  75. exonware/xwlazy/runtime/metrics.py +0 -4
  76. exonware/xwlazy/runtime/performance.py +0 -2
  77. exonware/xwlazy/version.py +2 -2
  78. {exonware_xwlazy-0.1.0.19.dist-info → exonware_xwlazy-0.1.0.20.dist-info}/METADATA +4 -2
  79. exonware_xwlazy-0.1.0.20.dist-info/RECORD +87 -0
  80. exonware_xwlazy-0.1.0.19.dist-info/RECORD +0 -87
  81. {exonware_xwlazy-0.1.0.19.dist-info → exonware_xwlazy-0.1.0.20.dist-info}/WHEEL +0 -0
  82. {exonware_xwlazy-0.1.0.19.dist-info → exonware_xwlazy-0.1.0.20.dist-info}/licenses/LICENSE +0 -0
@@ -4,7 +4,7 @@
4
4
  Company: eXonware.com
5
5
  Author: Eng. Muhammad AlShehri
6
6
  Email: connect@exonware.com
7
- Version: 0.1.0.19
7
+
8
8
  Generation Date: 10-Oct-2025
9
9
 
10
10
  Contracts for Lazy Loading System
@@ -25,7 +25,6 @@ from .defs import (
25
25
  LazyModeConfig,
26
26
  )
27
27
 
28
-
29
28
  # =============================================================================
30
29
  # PROTOCOLS / INTERFACES (Following GUIDE_DEV.md - Use IClass naming)
31
30
  # =============================================================================
@@ -381,7 +380,6 @@ class IPackageHelper(Protocol):
381
380
  """
382
381
  ...
383
382
 
384
-
385
383
  class IModuleHelper(Protocol):
386
384
  """
387
385
  Unified interface for module operations.
@@ -875,7 +873,6 @@ class IModuleHelper(Protocol):
875
873
  """Clear bytecode cache (from IBytecodeCache)."""
876
874
  ...
877
875
 
878
-
879
876
  class IRuntime(Protocol):
880
877
  """
881
878
  Unified interface for runtime services.
@@ -1172,7 +1169,6 @@ class IRuntime(Protocol):
1172
1169
  """
1173
1170
  ...
1174
1171
 
1175
-
1176
1172
  # =============================================================================
1177
1173
  # STRATEGY INTERFACES (New Strategy Pattern)
1178
1174
  # =============================================================================
@@ -1200,7 +1196,6 @@ class ICachingStrategy(Protocol):
1200
1196
  """Clear all cached values."""
1201
1197
  ...
1202
1198
 
1203
-
1204
1199
  @runtime_checkable
1205
1200
  class IModuleHelperStrategy(Protocol):
1206
1201
  """
@@ -1220,7 +1215,6 @@ class IModuleHelperStrategy(Protocol):
1220
1215
  """Check if module is importable."""
1221
1216
  ...
1222
1217
 
1223
-
1224
1218
  @runtime_checkable
1225
1219
  class IPackageHelperStrategy(Protocol):
1226
1220
  """
@@ -1244,7 +1238,6 @@ class IPackageHelperStrategy(Protocol):
1244
1238
  """Get installed version."""
1245
1239
  ...
1246
1240
 
1247
-
1248
1241
  @runtime_checkable
1249
1242
  class IModuleManagerStrategy(Protocol):
1250
1243
  """
@@ -1272,7 +1265,6 @@ class IModuleManagerStrategy(Protocol):
1272
1265
  """Handle import error."""
1273
1266
  ...
1274
1267
 
1275
-
1276
1268
  @runtime_checkable
1277
1269
  class IPackageManagerStrategy(Protocol):
1278
1270
  """
@@ -1296,7 +1288,6 @@ class IPackageManagerStrategy(Protocol):
1296
1288
  """Check security policy."""
1297
1289
  ...
1298
1290
 
1299
-
1300
1291
  # =============================================================================
1301
1292
  # NEW PACKAGE STRATEGY TYPES (Redesigned Architecture)
1302
1293
  # =============================================================================
@@ -1316,7 +1307,6 @@ class IInstallExecutionStrategy(Protocol):
1316
1307
  """Execute uninstallation of a package."""
1317
1308
  ...
1318
1309
 
1319
-
1320
1310
  @runtime_checkable
1321
1311
  class IInstallTimingStrategy(Protocol):
1322
1312
  """
@@ -1336,7 +1326,6 @@ class IInstallTimingStrategy(Protocol):
1336
1326
  """Get priority order for installing packages."""
1337
1327
  ...
1338
1328
 
1339
-
1340
1329
  @runtime_checkable
1341
1330
  class IDiscoveryStrategy(Protocol):
1342
1331
  """
@@ -1352,7 +1341,6 @@ class IDiscoveryStrategy(Protocol):
1352
1341
  """Get the source of a discovered dependency."""
1353
1342
  ...
1354
1343
 
1355
-
1356
1344
  @runtime_checkable
1357
1345
  class IPolicyStrategy(Protocol):
1358
1346
  """
@@ -1368,7 +1356,6 @@ class IPolicyStrategy(Protocol):
1368
1356
  """Get pip arguments based on policy."""
1369
1357
  ...
1370
1358
 
1371
-
1372
1359
  @runtime_checkable
1373
1360
  class IMappingStrategy(Protocol):
1374
1361
  """
@@ -1384,7 +1371,6 @@ class IMappingStrategy(Protocol):
1384
1371
  """Map package name to possible import names."""
1385
1372
  ...
1386
1373
 
1387
-
1388
1374
  # =============================================================================
1389
1375
  # EXPORT ALL
1390
1376
  # =============================================================================
exonware/xwlazy/defs.py CHANGED
@@ -4,7 +4,6 @@
4
4
  Company: eXonware.com
5
5
  Author: Eng. Muhammad AlShehri
6
6
  Email: connect@exonware.com
7
- Version: 0.1.0.19
8
7
  Generation Date: 10-Oct-2025
9
8
 
10
9
  Type Definitions and Constants for Lazy Loading System
@@ -18,7 +17,6 @@ from typing import TypedDict, Dict, List, Optional, Any, Tuple
18
17
  from dataclasses import dataclass, field
19
18
  from types import ModuleType
20
19
 
21
-
22
20
  # =============================================================================
23
21
  # ENUMS
24
22
  # =============================================================================
@@ -38,7 +36,6 @@ class LazyLoadMode(Enum):
38
36
  ULTRA = "ultra" # Aggressive optimizations (pre-compiled bytecode, mmap, etc.)
39
37
  INTELLIGENT = "intelligent" # Automatically switches to fastest mode based on load level
40
38
 
41
-
42
39
  class LazyInstallMode(Enum):
43
40
  """Lazy installation modes."""
44
41
  # Core modes
@@ -55,14 +52,12 @@ class LazyInstallMode(Enum):
55
52
  DISABLED = "disabled" # Don't install anything (alias for NONE, more explicit)
56
53
  DRY_RUN = "dry_run" # Show what would be installed but don't install
57
54
 
58
-
59
55
  class PathType(Enum):
60
56
  """Path types for validation."""
61
57
  FILE = "file"
62
58
  DIRECTORY = "directory"
63
59
  UNKNOWN = "unknown"
64
60
 
65
-
66
61
  class InstallStatus(Enum):
67
62
  """Installation status."""
68
63
  PENDING = "pending"
@@ -71,7 +66,6 @@ class InstallStatus(Enum):
71
66
  FAILED = "failed"
72
67
  SKIPPED = "skipped"
73
68
 
74
-
75
69
  class LoadLevel(Enum):
76
70
  """Load level categories."""
77
71
  LIGHT = "light_load"
@@ -79,7 +73,6 @@ class LoadLevel(Enum):
79
73
  HEAVY = "heavy_load"
80
74
  ENTERPRISE = "enterprise_load"
81
75
 
82
-
83
76
  # =============================================================================
84
77
  # DATACLASSES
85
78
  # =============================================================================
@@ -93,7 +86,6 @@ class DependencyInfo:
93
86
  source: str = "unknown"
94
87
  category: str = "general"
95
88
 
96
-
97
89
  @dataclass
98
90
  class LazyModeConfig:
99
91
  """Two-dimensional lazy mode configuration combining load and install modes."""
@@ -113,7 +105,6 @@ class LazyModeConfig:
113
105
  if isinstance(self.install_mode, str):
114
106
  self.install_mode = LazyInstallMode(self.install_mode)
115
107
 
116
-
117
108
  @dataclass
118
109
  class InstallResult:
119
110
  """Result of an installation operation."""
@@ -124,7 +115,6 @@ class InstallResult:
124
115
  version: Optional[str] = None
125
116
  source: Optional[str] = None # "cache", "pip", "wheel", etc.
126
117
 
127
-
128
118
  @dataclass
129
119
  class LazyConfig:
130
120
  """Bridge configuration settings with the lazy package implementation."""
@@ -135,7 +125,6 @@ class LazyConfig:
135
125
  def __post_init__(self) -> None:
136
126
  self.packages = tuple(package.lower() for package in self.packages)
137
127
 
138
-
139
128
  @dataclass(frozen=True)
140
129
  class PackageManifest:
141
130
  """Resolved manifest data for a single package."""
@@ -157,7 +146,6 @@ class PackageManifest:
157
146
  # Case-insensitive fallback for convenience
158
147
  return self.dependencies.get(import_name.lower())
159
148
 
160
-
161
149
  @dataclass(frozen=True)
162
150
  class PackageData:
163
151
  """
@@ -174,7 +162,6 @@ class PackageData:
174
162
  error: Optional[Exception] = None
175
163
  metadata: Dict[str, Any] = field(default_factory=dict)
176
164
 
177
-
178
165
  @dataclass(frozen=True)
179
166
  class ModuleData:
180
167
  """
@@ -190,7 +177,6 @@ class ModuleData:
190
177
  error: Optional[Exception] = None
191
178
  metadata: Dict[str, Any] = field(default_factory=dict)
192
179
 
193
-
194
180
  # =============================================================================
195
181
  # TYPE DEFINITIONS
196
182
  # =============================================================================
@@ -203,7 +189,6 @@ class DependencyMapping(TypedDict, total=False):
203
189
  source: str
204
190
  category: str
205
191
 
206
-
207
192
  class PackageStats(TypedDict, total=False):
208
193
  """Type definition for package statistics."""
209
194
  enabled: bool
@@ -214,7 +199,6 @@ class PackageStats(TypedDict, total=False):
214
199
  total_installed: int
215
200
  total_failed: int
216
201
 
217
-
218
202
  class LazyStatus(TypedDict, total=False):
219
203
  """Type definition for lazy mode status."""
220
204
  enabled: bool
@@ -223,7 +207,6 @@ class LazyStatus(TypedDict, total=False):
223
207
  active: bool
224
208
  error: Optional[str]
225
209
 
226
-
227
210
  # =============================================================================
228
211
  # CONSTANTS
229
212
  # =============================================================================
@@ -340,12 +323,10 @@ PRESET_MODES: Dict[str, LazyModeConfig] = {
340
323
  ),
341
324
  }
342
325
 
343
-
344
326
  def get_preset_mode(preset_name: str) -> Optional[LazyModeConfig]:
345
327
  """Get preset mode configuration by name."""
346
328
  return PRESET_MODES.get(preset_name.lower())
347
329
 
348
-
349
330
  # =============================================================================
350
331
  # EXPORT ALL
351
332
  # =============================================================================
exonware/xwlazy/errors.py CHANGED
@@ -4,7 +4,7 @@
4
4
  Company: eXonware.com
5
5
  Author: Eng. Muhammad AlShehri
6
6
  Email: connect@exonware.com
7
- Version: 0.1.0.19
7
+
8
8
  Generation Date: 10-Oct-2025
9
9
 
10
10
  Errors for Lazy Loading System
@@ -15,7 +15,6 @@ following GUIDE_ARCH.md structure.
15
15
 
16
16
  from typing import Optional, Any
17
17
 
18
-
19
18
  # =============================================================================
20
19
  # BASE EXCEPTION
21
20
  # =============================================================================
@@ -40,7 +39,6 @@ class LazySystemError(Exception):
40
39
  message = f"[{package_name}] {message}"
41
40
  super().__init__(message)
42
41
 
43
-
44
42
  # =============================================================================
45
43
  # SPECIFIC EXCEPTIONS
46
44
  # =============================================================================
@@ -56,7 +54,6 @@ class LazyInstallError(LazySystemError):
56
54
  """
57
55
  pass
58
56
 
59
-
60
57
  class LazyDiscoveryError(LazySystemError):
61
58
  """
62
59
  Raised when dependency discovery fails.
@@ -68,7 +65,6 @@ class LazyDiscoveryError(LazySystemError):
68
65
  """
69
66
  pass
70
67
 
71
-
72
68
  class LazyHookError(LazySystemError):
73
69
  """
74
70
  Raised when import hook operation fails.
@@ -80,7 +76,6 @@ class LazyHookError(LazySystemError):
80
76
  """
81
77
  pass
82
78
 
83
-
84
79
  class LazySecurityError(LazySystemError):
85
80
  """
86
81
  Raised when security policy is violated.
@@ -92,7 +87,6 @@ class LazySecurityError(LazySystemError):
92
87
  """
93
88
  pass
94
89
 
95
-
96
90
  class ExternallyManagedError(LazyInstallError):
97
91
  """
98
92
  Raised when environment is externally managed (PEP 668).
@@ -120,7 +114,6 @@ class ExternallyManagedError(LazyInstallError):
120
114
  )
121
115
  super().__init__(message, package_name=None)
122
116
 
123
-
124
117
  class DeferredImportError(Exception):
125
118
  """
126
119
  Placeholder for a failed import that will be retried when accessed.
@@ -264,7 +257,6 @@ class DeferredImportError(Exception):
264
257
  return f"<DeferredImport: {self._import_name} (loaded)>"
265
258
  return f"<DeferredImport: {self._import_name} (will install on first use)>"
266
259
 
267
-
268
260
  # =============================================================================
269
261
  # EXPORT ALL
270
262
  # =============================================================================