python-injection 0.18.2__tar.gz → 0.18.4__tar.gz
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.
- {python_injection-0.18.2 → python_injection-0.18.4}/PKG-INFO +1 -1
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/module.py +5 -19
- {python_injection-0.18.2 → python_injection-0.18.4}/pyproject.toml +1 -1
- {python_injection-0.18.2 → python_injection-0.18.4}/.gitignore +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/LICENSE +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/README.md +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/__init__.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/__init__.pyi +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/__init__.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/__init__.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/asynchronous.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/event.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/invertible.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/key.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/lazy.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/common/type.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/descriptors.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/injectables.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/scope.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/_core/slots.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/entrypoint.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/exceptions.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/ext/__init__.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/ext/fastapi.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/ext/fastapi.pyi +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/loaders.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/py.typed +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/testing/__init__.py +0 -0
- {python_injection-0.18.2 → python_injection-0.18.4}/injection/testing/__init__.pyi +0 -0
@@ -156,12 +156,6 @@ class ModulePriorityUpdated(ModuleEvent):
|
|
156
156
|
)
|
157
157
|
|
158
158
|
|
159
|
-
@dataclass(frozen=True, slots=True)
|
160
|
-
class UnlockCalled(Event):
|
161
|
-
def __str__(self) -> str:
|
162
|
-
return "An `unlock` method has been called."
|
163
|
-
|
164
|
-
|
165
159
|
"""
|
166
160
|
Broker
|
167
161
|
"""
|
@@ -808,20 +802,13 @@ class Module(Broker, EventListener):
|
|
808
802
|
return self
|
809
803
|
|
810
804
|
def unlock(self) -> Self:
|
811
|
-
|
812
|
-
|
813
|
-
with self.dispatch(event, lock_bypass=True):
|
814
|
-
for broker in self.__brokers:
|
815
|
-
broker.unlock()
|
805
|
+
for broker in self.__brokers:
|
806
|
+
broker.unlock()
|
816
807
|
|
817
808
|
return self
|
818
809
|
|
819
810
|
def load_profile(self, *names: str) -> ContextManager[Self]:
|
820
|
-
modules =
|
821
|
-
|
822
|
-
for module in modules:
|
823
|
-
module.unlock()
|
824
|
-
|
811
|
+
modules = (self.from_name(name) for name in names)
|
825
812
|
self.unlock().init_modules(*modules)
|
826
813
|
|
827
814
|
@contextmanager
|
@@ -852,9 +839,8 @@ class Module(Broker, EventListener):
|
|
852
839
|
return self.dispatch(self_event)
|
853
840
|
|
854
841
|
@contextmanager
|
855
|
-
def dispatch(self, event: Event
|
856
|
-
|
857
|
-
self.__check_locking()
|
842
|
+
def dispatch(self, event: Event) -> Iterator[None]:
|
843
|
+
self.__check_locking()
|
858
844
|
|
859
845
|
with self.__channel.dispatch(event):
|
860
846
|
try:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|