anydi 0.26.6__tar.gz → 0.26.7__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. {anydi-0.26.6 → anydi-0.26.7}/PKG-INFO +1 -1
  2. {anydi-0.26.6 → anydi-0.26.7}/anydi/_utils.py +9 -7
  3. {anydi-0.26.6 → anydi-0.26.7}/pyproject.toml +1 -1
  4. {anydi-0.26.6 → anydi-0.26.7}/LICENSE +0 -0
  5. {anydi-0.26.6 → anydi-0.26.7}/README.md +0 -0
  6. {anydi-0.26.6 → anydi-0.26.7}/anydi/__init__.py +0 -0
  7. {anydi-0.26.6 → anydi-0.26.7}/anydi/_container.py +0 -0
  8. {anydi-0.26.6 → anydi-0.26.7}/anydi/_context.py +0 -0
  9. {anydi-0.26.6 → anydi-0.26.7}/anydi/_logger.py +0 -0
  10. {anydi-0.26.6 → anydi-0.26.7}/anydi/_module.py +0 -0
  11. {anydi-0.26.6 → anydi-0.26.7}/anydi/_scanner.py +0 -0
  12. {anydi-0.26.6 → anydi-0.26.7}/anydi/_types.py +0 -0
  13. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/__init__.py +0 -0
  14. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/__init__.py +0 -0
  15. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/_container.py +0 -0
  16. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/_settings.py +0 -0
  17. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/_utils.py +0 -0
  18. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/apps.py +0 -0
  19. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/middleware.py +0 -0
  20. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/ninja/__init__.py +0 -0
  21. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/ninja/_operation.py +0 -0
  22. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/django/ninja/_signature.py +0 -0
  23. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/fastapi.py +0 -0
  24. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/pytest_plugin.py +0 -0
  25. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/starlette/__init__.py +0 -0
  26. {anydi-0.26.6 → anydi-0.26.7}/anydi/ext/starlette/middleware.py +0 -0
  27. {anydi-0.26.6 → anydi-0.26.7}/anydi/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: anydi
3
- Version: 0.26.6
3
+ Version: 0.26.7
4
4
  Summary: Dependency Injection library
5
5
  Home-page: https://github.com/antonrh/anydi
6
6
  License: MIT
@@ -16,6 +16,10 @@ except ImportError:
16
16
  anyio = None # type: ignore[assignment]
17
17
 
18
18
 
19
+ T = TypeVar("T")
20
+ P = ParamSpec("P")
21
+
22
+
19
23
  def evaluate_forwardref(type_: ForwardRef, globalns: Any, localns: Any) -> Any:
20
24
  if sys.version_info < (3, 9):
21
25
  return type_._evaluate(globalns, localns) # noqa
@@ -26,10 +30,6 @@ def evaluate_forwardref(type_: ForwardRef, globalns: Any, localns: Any) -> Any:
26
30
  return type_._evaluate(globalns, localns, frozenset()) # noqa
27
31
 
28
32
 
29
- T = TypeVar("T")
30
- P = ParamSpec("P")
31
-
32
-
33
33
  def get_full_qualname(obj: Any) -> str:
34
34
  """Get the fully qualified name of an object."""
35
35
  qualname = getattr(obj, "__qualname__", None)
@@ -69,10 +69,12 @@ def get_typed_annotation(
69
69
  ) -> Any:
70
70
  """Get the typed annotation of a parameter."""
71
71
  if isinstance(annotation, str):
72
- if sys.version_info < (3, 9):
73
- annotation = ForwardRef(annotation)
74
- else:
72
+ if sys.version_info >= (3, 10, 2):
75
73
  annotation = ForwardRef(annotation, module=module, is_class=is_class)
74
+ elif sys.version_info >= (3, 10, 0):
75
+ annotation = ForwardRef(annotation, module=module)
76
+ else:
77
+ annotation = ForwardRef(annotation)
76
78
  annotation = evaluate_forwardref(annotation, globalns, {})
77
79
  return annotation
78
80
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "anydi"
3
- version = "0.26.6"
3
+ version = "0.26.7"
4
4
  description = "Dependency Injection library"
5
5
  authors = ["Anton Ruhlov <antonruhlov@gmail.com>"]
6
6
  license = "MIT"
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