anydi 0.30.0__py3-none-any.whl → 0.31.0__py3-none-any.whl

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/_utils.py CHANGED
@@ -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,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: anydi
3
- Version: 0.30.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.8,<4.0
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.8+, based on type annotations ([PEP 484](https://peps.python.org/pep-0484/)).
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
 
@@ -5,7 +5,7 @@ anydi/_logger.py,sha256=UpubJUnW83kffFxkhUlObm2DmZX1Pjqoz9YFKS-JOPg,52
5
5
  anydi/_module.py,sha256=PoMdn-6KlDSiq-0Z7TesSnG-_fg6tyGxC1pjNydplTk,3819
6
6
  anydi/_scanner.py,sha256=cyEk-K2Q8ssZStq8GrxMeEcCuAZMw-RXrjlgWEevKCs,6667
7
7
  anydi/_types.py,sha256=i8xFxz8pmFj7SGqwOwae_P9VtiRie6DVLwfaLibLwhc,3653
8
- anydi/_utils.py,sha256=Z6Hdf68LW4f8vihFaxg4kbVICzddP5A1nYXa5Id9AfE,4640
8
+ anydi/_utils.py,sha256=xqxF70UiuwxpMlmCYszkKVSi8JvXY-0J41B0gRKVxr8,4556
9
9
  anydi/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  anydi/ext/_utils.py,sha256=2kxLPTMM9Ro3s6-knbqYzONlqRB3hMcwZFFRQGHcFUg,2691
11
11
  anydi/ext/django/__init__.py,sha256=QI1IABCVgSDTUoh7M9WMECKXwB3xvh04HfQ9TOWw1Mk,223
@@ -20,12 +20,12 @@ anydi/ext/django/ninja/_signature.py,sha256=2cSzKxBIxXLqtwNuH6GSlmjVJFftoGmleWfy
20
20
  anydi/ext/fastapi.py,sha256=vhfSyovXuCjvSkx6AiLOTNU975i8wDg72C5fqXQiFLw,2896
21
21
  anydi/ext/faststream.py,sha256=L4rkWYIO4ZZuWH-8M8NT6_J0bT0Dz_EWO3B6Oj1iFBI,2024
22
22
  anydi/ext/pydantic_settings.py,sha256=PciVSSyRzk1Uu3Ppz-Y58pqcsZyUVIcZIzYOgJMB_4I,1490
23
- anydi/ext/pytest_plugin.py,sha256=3OWphc4nEzla46_8KR7LXtwGns5eol_YlUWfTf4Cr2Q,3952
23
+ anydi/ext/pytest_plugin.py,sha256=w3Yt-ZUEOehpXWq7W5T53lgmD7dFZCQwLoM31M4VBwc,4177
24
24
  anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  anydi/ext/starlette/middleware.py,sha256=Ni0BQaPjs_Ha6zcLZYYJ3-XkslTCnL9aCSa06rnRDMI,1139
26
26
  anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- anydi-0.30.0.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
28
- anydi-0.30.0.dist-info/METADATA,sha256=DFCfcxI3AhedhOr8XEEb5JfGRv5daeZnxQlN1C_RPUA,5162
29
- anydi-0.30.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
- anydi-0.30.0.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
31
- anydi-0.30.0.dist-info/RECORD,,
27
+ anydi-0.31.0.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
28
+ anydi-0.31.0.dist-info/METADATA,sha256=S-zez2fP4ngBm_MDusE5t1ghVYgGmuJ4sYnaiRl5iV4,5112
29
+ anydi-0.31.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
30
+ anydi-0.31.0.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
31
+ anydi-0.31.0.dist-info/RECORD,,
File without changes