anydi 0.30.0__tar.gz → 0.31.0__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.
- {anydi-0.30.0 → anydi-0.31.0}/PKG-INFO +3 -4
- {anydi-0.30.0 → anydi-0.31.0}/README.md +1 -1
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_utils.py +0 -2
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/pytest_plugin.py +5 -0
- {anydi-0.30.0 → anydi-0.31.0}/pyproject.toml +4 -5
- {anydi-0.30.0 → anydi-0.31.0}/LICENSE +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/__init__.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_container.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_context.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_logger.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_module.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_scanner.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/_types.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/__init__.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/_utils.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/__init__.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/_container.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/_settings.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/_utils.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/apps.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/middleware.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/ninja/__init__.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/ninja/_operation.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/django/ninja/_signature.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/fastapi.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/faststream.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/pydantic_settings.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/starlette/__init__.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/ext/starlette/middleware.py +0 -0
- {anydi-0.30.0 → anydi-0.31.0}/anydi/py.typed +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: anydi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.31.0
|
|
4
4
|
Summary: Dependency Injection library
|
|
5
5
|
Home-page: https://github.com/antonrh/anydi
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: dependency injection,dependencies,di,async,asyncio,application
|
|
8
8
|
Author: Anton Ruhlov
|
|
9
9
|
Author-email: antonruhlov@gmail.com
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.9,<4.0
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Environment :: Web Environment
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
@@ -16,7 +16,6 @@ Classifier: Intended Audience :: System Administrators
|
|
|
16
16
|
Classifier: License :: OSI Approved :: MIT License
|
|
17
17
|
Classifier: Operating System :: OS Independent
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -63,7 +62,7 @@ http://anydi.readthedocs.io/
|
|
|
63
62
|
|
|
64
63
|
---
|
|
65
64
|
|
|
66
|
-
`AnyDI` is a modern, lightweight Dependency Injection library suitable for any synchronous or asynchronous applications with Python 3.
|
|
65
|
+
`AnyDI` is a modern, lightweight Dependency Injection library suitable for any synchronous or asynchronous applications with Python 3.9+, based on type annotations ([PEP 484](https://peps.python.org/pep-0484/)).
|
|
67
66
|
|
|
68
67
|
The key features are:
|
|
69
68
|
|
|
@@ -23,7 +23,7 @@ http://anydi.readthedocs.io/
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
`AnyDI` is a modern, lightweight Dependency Injection library suitable for any synchronous or asynchronous applications with Python 3.
|
|
26
|
+
`AnyDI` is a modern, lightweight Dependency Injection library suitable for any synchronous or asynchronous applications with Python 3.9+, based on type annotations ([PEP 484](https://peps.python.org/pep-0484/)).
|
|
27
27
|
|
|
28
28
|
The key features are:
|
|
29
29
|
|
|
@@ -53,8 +53,6 @@ def is_builtin_type(tp: type[Any]) -> bool:
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
def evaluate_forwardref(type_: ForwardRef, globalns: Any, localns: Any) -> Any:
|
|
56
|
-
if sys.version_info < (3, 9):
|
|
57
|
-
return type_._evaluate(globalns, localns)
|
|
58
56
|
return type_._evaluate(globalns, localns, recursive_guard=frozenset())
|
|
59
57
|
|
|
60
58
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import inspect
|
|
4
|
+
import logging
|
|
4
5
|
from typing import Any, Callable, Iterator, cast
|
|
5
6
|
|
|
6
7
|
import pytest
|
|
@@ -8,6 +9,8 @@ import pytest
|
|
|
8
9
|
from anydi import Container
|
|
9
10
|
from anydi._utils import get_typed_parameters
|
|
10
11
|
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
def pytest_configure(config: pytest.Config) -> None:
|
|
13
16
|
config.addinivalue_line(
|
|
@@ -102,6 +105,7 @@ def _anydi_inject(
|
|
|
102
105
|
try:
|
|
103
106
|
request.node.funcargs[argname] = container.resolve(interface)
|
|
104
107
|
except Exception: # noqa
|
|
108
|
+
logger.warning(f"Failed to resolve dependency for argument '{argname}'.")
|
|
105
109
|
_anydi_unresolved.append(interface)
|
|
106
110
|
|
|
107
111
|
|
|
@@ -127,4 +131,5 @@ async def _anydi_ainject(
|
|
|
127
131
|
try:
|
|
128
132
|
request.node.funcargs[argname] = await container.aresolve(interface)
|
|
129
133
|
except Exception: # noqa
|
|
134
|
+
logger.warning(f"Failed to resolve dependency for argument '{argname}'.")
|
|
130
135
|
_anydi_unresolved.append(interface)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "anydi"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.31.0"
|
|
4
4
|
description = "Dependency Injection library"
|
|
5
5
|
authors = ["Anton Ruhlov <antonruhlov@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -22,7 +22,6 @@ classifiers = [
|
|
|
22
22
|
"Intended Audience :: Developers",
|
|
23
23
|
"License :: OSI Approved :: MIT License",
|
|
24
24
|
"Programming Language :: Python :: 3",
|
|
25
|
-
"Programming Language :: Python :: 3.8",
|
|
26
25
|
"Programming Language :: Python :: 3.9",
|
|
27
26
|
"Programming Language :: Python :: 3.10",
|
|
28
27
|
"Programming Language :: Python :: 3.11",
|
|
@@ -35,7 +34,7 @@ packages = [
|
|
|
35
34
|
]
|
|
36
35
|
|
|
37
36
|
[tool.poetry.dependencies]
|
|
38
|
-
python = "^3.
|
|
37
|
+
python = "^3.9"
|
|
39
38
|
typing-extensions = "^4.12.1"
|
|
40
39
|
anyio = { version = "^3.6.2", optional = true }
|
|
41
40
|
mkdocs = { version = "^1.4.2", optional = true }
|
|
@@ -46,8 +45,8 @@ docs = ["mkdocs", "mkdocs-material"]
|
|
|
46
45
|
async = ["anyio"]
|
|
47
46
|
|
|
48
47
|
[tool.poetry.group.dev.dependencies]
|
|
49
|
-
mypy = "^1.
|
|
50
|
-
ruff = "^0.
|
|
48
|
+
mypy = "^1.13.0"
|
|
49
|
+
ruff = "^0.7.1"
|
|
51
50
|
pytest = "^8.3.1"
|
|
52
51
|
pytest-cov = "^5.0.0"
|
|
53
52
|
fastapi = "^0.100.0"
|
|
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
|