python-injection 0.17.2__tar.gz → 0.17.3.post0__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 (27) hide show
  1. {python_injection-0.17.2 → python_injection-0.17.3.post0}/PKG-INFO +3 -1
  2. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/ext/fastapi.py +2 -6
  3. python_injection-0.17.3.post0/injection/ext/fastapi.pyi +5 -0
  4. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/testing/__init__.py +1 -1
  5. {python_injection-0.17.2 → python_injection-0.17.3.post0}/pyproject.toml +6 -2
  6. {python_injection-0.17.2 → python_injection-0.17.3.post0}/.gitignore +0 -0
  7. {python_injection-0.17.2 → python_injection-0.17.3.post0}/README.md +0 -0
  8. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/__init__.py +0 -0
  9. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/__init__.pyi +0 -0
  10. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/__init__.py +0 -0
  11. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/__init__.py +0 -0
  12. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/asynchronous.py +0 -0
  13. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/event.py +0 -0
  14. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/invertible.py +0 -0
  15. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/key.py +0 -0
  16. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/lazy.py +0 -0
  17. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/common/type.py +0 -0
  18. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/descriptors.py +0 -0
  19. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/injectables.py +0 -0
  20. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/module.py +0 -0
  21. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/scope.py +0 -0
  22. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/_core/slots.py +0 -0
  23. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/exceptions.py +0 -0
  24. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/ext/__init__.py +0 -0
  25. /python_injection-0.17.2/injection/utils.py → /python_injection-0.17.3.post0/injection/loaders.py +0 -0
  26. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/py.typed +0 -0
  27. {python_injection-0.17.2 → python_injection-0.17.3.post0}/injection/testing/__init__.pyi +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-injection
3
- Version: 0.17.2
3
+ Version: 0.17.3.post0
4
4
  Summary: Fast and easy dependency injection framework.
5
5
  Project-URL: Repository, https://github.com/100nm/python-injection
6
6
  Author: remimd
@@ -19,6 +19,8 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
19
  Classifier: Topic :: Software Development :: Testing
20
20
  Classifier: Typing :: Typed
21
21
  Requires-Python: <4,>=3.12
22
+ Provides-Extra: async
23
+ Requires-Dist: anyio; extra == 'async'
22
24
  Description-Content-Type: text/markdown
23
25
 
24
26
  # python-injection
@@ -1,5 +1,5 @@
1
1
  from types import GenericAlias
2
- from typing import TYPE_CHECKING, Annotated, Any, TypeAliasType
2
+ from typing import Annotated, Any, TypeAliasType
3
3
 
4
4
  from fastapi import Depends
5
5
 
@@ -33,10 +33,6 @@ class FastAPIInject:
33
33
  return Annotated[cls, self(cls), *iter_params]
34
34
 
35
35
 
36
- if TYPE_CHECKING:
37
- type Inject[T, *Metadata] = Annotated[T, Depends(...), *Metadata]
38
-
39
- else:
40
- Inject = FastAPIInject()
36
+ Inject = FastAPIInject()
41
37
 
42
38
  del FastAPIInject
@@ -0,0 +1,5 @@
1
+ from typing import Annotated
2
+
3
+ from fastapi import Depends
4
+
5
+ type Inject[T, *Metadata] = Annotated[T, Depends(...), *Metadata]
@@ -1,7 +1,7 @@
1
1
  from typing import ContextManager, Final
2
2
 
3
3
  from injection import Module, mod
4
- from injection.utils import load_profile
4
+ from injection.loaders import load_profile
5
5
 
6
6
  __all__ = (
7
7
  "load_test_profile",
@@ -9,7 +9,6 @@ bench = [
9
9
  "types-tabulate",
10
10
  ]
11
11
  dev = [
12
- "anyio",
13
12
  "hatch",
14
13
  "mypy",
15
14
  "ruff",
@@ -25,7 +24,7 @@ test = [
25
24
 
26
25
  [project]
27
26
  name = "python-injection"
28
- version = "0.17.2"
27
+ version = "0.17.3.post0"
29
28
  description = "Fast and easy dependency injection framework."
30
29
  license = { text = "MIT" }
31
30
  readme = "README.md"
@@ -48,6 +47,11 @@ classifiers = [
48
47
  ]
49
48
  dependencies = []
50
49
 
50
+ [project.optional-dependencies]
51
+ async = [
52
+ "anyio",
53
+ ]
54
+
51
55
  [project.urls]
52
56
  Repository = "https://github.com/100nm/python-injection"
53
57