python-injection 0.14.4__tar.gz → 0.14.5__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.
Files changed (26) hide show
  1. {python_injection-0.14.4 → python_injection-0.14.5}/PKG-INFO +1 -1
  2. {python_injection-0.14.4 → python_injection-0.14.5}/injection/__init__.pyi +1 -1
  3. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/module.py +1 -1
  4. {python_injection-0.14.4 → python_injection-0.14.5}/injection/utils.py +2 -1
  5. {python_injection-0.14.4 → python_injection-0.14.5}/pyproject.toml +1 -1
  6. {python_injection-0.14.4 → python_injection-0.14.5}/.gitignore +0 -0
  7. {python_injection-0.14.4 → python_injection-0.14.5}/README.md +0 -0
  8. {python_injection-0.14.4 → python_injection-0.14.5}/injection/__init__.py +0 -0
  9. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/__init__.py +0 -0
  10. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/__init__.py +0 -0
  11. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/asynchronous.py +0 -0
  12. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/event.py +0 -0
  13. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/invertible.py +0 -0
  14. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/key.py +0 -0
  15. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/lazy.py +0 -0
  16. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/common/type.py +0 -0
  17. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/descriptors.py +0 -0
  18. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/injectables.py +0 -0
  19. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/scope.py +0 -0
  20. {python_injection-0.14.4 → python_injection-0.14.5}/injection/_core/slots.py +0 -0
  21. {python_injection-0.14.4 → python_injection-0.14.5}/injection/exceptions.py +0 -0
  22. {python_injection-0.14.4 → python_injection-0.14.5}/injection/integrations/__init__.py +0 -0
  23. {python_injection-0.14.4 → python_injection-0.14.5}/injection/integrations/fastapi.py +0 -0
  24. {python_injection-0.14.4 → python_injection-0.14.5}/injection/py.typed +0 -0
  25. {python_injection-0.14.4 → python_injection-0.14.5}/injection/testing/__init__.py +0 -0
  26. {python_injection-0.14.4 → python_injection-0.14.5}/injection/testing/__init__.pyi +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-injection
3
- Version: 0.14.4
3
+ Version: 0.14.5
4
4
  Summary: Fast and easy dependency injection framework.
5
5
  Project-URL: Repository, https://github.com/100nm/python-injection
6
6
  Author: remimd
@@ -50,7 +50,7 @@ class Injectable[T](Protocol):
50
50
  @runtime_checkable
51
51
  class Slot[T](Protocol):
52
52
  @abstractmethod
53
- def set(self, instance: T, /) -> Self: ...
53
+ def set(self, instance: T, /) -> None: ...
54
54
 
55
55
  class LazyInstance[T]:
56
56
  def __init__(
@@ -550,7 +550,7 @@ class Module(Broker, EventListener):
550
550
  ) -> Slot[T]:
551
551
  def when_empty() -> T:
552
552
  raise EmptySlotError(
553
- f"The slot for `{on}` is unset in the current `{scope_name}` scope."
553
+ f"The slot for `{on}` isn't set in the current `{scope_name}` scope."
554
554
  )
555
555
 
556
556
  injectable = SimpleScopedInjectable(SyncCaller(when_empty), scope_name)
@@ -1,3 +1,4 @@
1
+ import sys
1
2
  from collections.abc import Callable, Collection, Iterator
2
3
  from importlib import import_module
3
4
  from importlib.util import find_spec
@@ -89,7 +90,7 @@ def __iter_modules_from(
89
90
  for info in walk_packages(path=package_path, prefix=f"{package_name}."):
90
91
  name = info.name
91
92
 
92
- if info.ispkg or not predicate(name):
93
+ if info.ispkg or name in sys.modules or not predicate(name):
93
94
  continue
94
95
 
95
96
  yield name, import_module(name)
@@ -24,7 +24,7 @@ test = [
24
24
 
25
25
  [project]
26
26
  name = "python-injection"
27
- version = "0.14.4"
27
+ version = "0.14.5"
28
28
  description = "Fast and easy dependency injection framework."
29
29
  license = { text = "MIT" }
30
30
  readme = "README.md"