composat 1.0.0__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.
- composat/__init__.py +70 -0
- composat/assembly.py +1048 -0
- composat/component.py +514 -0
- composat/context.py +147 -0
- composat/dependency.py +169 -0
- composat/errors.py +130 -0
- composat/identity.py +75 -0
- composat/loader.py +364 -0
- composat/manager.py +135 -0
- composat/py.typed +0 -0
- composat/registry.py +294 -0
- composat/scope.py +221 -0
- composat/spec.py +28 -0
- composat/state.py +318 -0
- composat/std/__init__.py +5 -0
- composat/std/drain.py +76 -0
- composat/std/pluggable.py +621 -0
- composat/std/root.py +136 -0
- composat/std/wait.py +61 -0
- composat-1.0.0.dist-info/METADATA +191 -0
- composat-1.0.0.dist-info/RECORD +24 -0
- composat-1.0.0.dist-info/WHEEL +4 -0
- composat-1.0.0.dist-info/entry_points.txt +4 -0
- composat-1.0.0.dist-info/licenses/LICENSE +21 -0
composat/__init__.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""composat: a component lifespan interface.
|
|
2
|
+
|
|
3
|
+
An assembly brings instances up and takes them down in dependency order, and the modules here are the
|
|
4
|
+
layers it stands on — identities and keys, effect scopes, the call level that says whose work a read
|
|
5
|
+
belongs to and where its effects end, the component base and what it declares, the state machine and
|
|
6
|
+
the manager that drives it, the dependency graph, the registry of declarations, and the assembly: the
|
|
7
|
+
table of what is up, the rule a requirement is answered by, the batch verbs that fill the table and
|
|
8
|
+
empty it, the report they hand back, and the stream of moves they report while they run.
|
|
9
|
+
|
|
10
|
+
``composat.std`` adds what a deployment needs on top of that: the loader that turns a path into the
|
|
11
|
+
module there and the components it exports, the component that owns moving a loaded module onto a new
|
|
12
|
+
generation, the wait for a swap to land, and the drain of an instance's work.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from . import context as context
|
|
16
|
+
from .assembly import Assembly as Assembly
|
|
17
|
+
from .assembly import AssemblyResult as AssemblyResult
|
|
18
|
+
from .assembly import Candidates as Candidates
|
|
19
|
+
from .assembly import Claim as Claim
|
|
20
|
+
from .assembly import Event as Event
|
|
21
|
+
from .assembly import Policy as Policy
|
|
22
|
+
from .assembly import Replacement as Replacement
|
|
23
|
+
from .assembly import answering_from as answering_from
|
|
24
|
+
from .assembly import default_rule as default_rule
|
|
25
|
+
from .component import LIFECYCLE_HOOKS as LIFECYCLE_HOOKS
|
|
26
|
+
from .component import Component as Component
|
|
27
|
+
from .component import RequirementResolver as RequirementResolver
|
|
28
|
+
from .component import attach as attach
|
|
29
|
+
from .component import capabilities_of as capabilities_of
|
|
30
|
+
from .component import reopen_epoch as reopen_epoch
|
|
31
|
+
from .component import require as require
|
|
32
|
+
from .component import requirements_of as requirements_of
|
|
33
|
+
from .context import CallContext as CallContext
|
|
34
|
+
from .context import current as current
|
|
35
|
+
from .context import current_or_none as current_or_none
|
|
36
|
+
from .context import open_call as open_call
|
|
37
|
+
from .context import put as put
|
|
38
|
+
from .context import resolve as resolve
|
|
39
|
+
from .dependency import DependencyCycleError as DependencyCycleError
|
|
40
|
+
from .dependency import DependencyError as DependencyError
|
|
41
|
+
from .dependency import DependencyGraph as DependencyGraph
|
|
42
|
+
from .dependency import DependencyInUseError as DependencyInUseError
|
|
43
|
+
from .errors import KeyInTransitError as KeyInTransitError
|
|
44
|
+
from .errors import LifecycleReentryError as LifecycleReentryError
|
|
45
|
+
from .errors import NoCallContextError as NoCallContextError
|
|
46
|
+
from .errors import ServiceNotUpError as ServiceNotUpError
|
|
47
|
+
from .errors import UnboundRequirementError as UnboundRequirementError
|
|
48
|
+
from .errors import UnboundServiceError as UnboundServiceError
|
|
49
|
+
from .identity import ComponentIdentity as ComponentIdentity
|
|
50
|
+
from .identity import ComponentKey as ComponentKey
|
|
51
|
+
from .loader import LoadedUnit as LoadedUnit
|
|
52
|
+
from .loader import Unit as Unit
|
|
53
|
+
from .loader import components_of as components_of
|
|
54
|
+
from .loader import fingerprint_of as fingerprint_of
|
|
55
|
+
from .loader import load_unit as load_unit
|
|
56
|
+
from .loader import load_units as load_units
|
|
57
|
+
from .loader import loaded_unit as loaded_unit
|
|
58
|
+
from .manager import ComponentManager as ComponentManager
|
|
59
|
+
from .registry import ComponentRegistry as ComponentRegistry
|
|
60
|
+
from .registry import Declaration as Declaration
|
|
61
|
+
from .scope import EffectScope as EffectScope
|
|
62
|
+
from .scope import Reclaimable as Reclaimable
|
|
63
|
+
from .scope import name_of as name_of
|
|
64
|
+
from .spec import RequirementSpec as RequirementSpec
|
|
65
|
+
from .state import Committed as Committed
|
|
66
|
+
from .state import ComponentState as ComponentState
|
|
67
|
+
from .state import ComponentStateControl as ComponentStateControl
|
|
68
|
+
from .state import ComponentStateError as ComponentStateError
|
|
69
|
+
from .state import Migration as Migration
|
|
70
|
+
from .state import Operation as Operation
|