anydi 0.48.0__py3-none-any.whl → 0.48.1__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/_container.py CHANGED
@@ -305,6 +305,7 @@ class Container:
305
305
  )
306
306
 
307
307
  unresolved_parameter = None
308
+ unresolved_exc: LookupError | None = None
308
309
  parameters: list[inspect.Parameter] = []
309
310
  scopes: dict[Scope, Provider] = {}
310
311
 
@@ -326,10 +327,11 @@ class Container:
326
327
 
327
328
  try:
328
329
  sub_provider = self._get_or_register_provider(parameter.annotation)
329
- except LookupError:
330
+ except LookupError as exc:
330
331
  if self._parameter_has_default(parameter, **defaults):
331
332
  continue
332
333
  unresolved_parameter = parameter
334
+ unresolved_exc = exc
333
335
  continue
334
336
 
335
337
  # Store first provider for each scope
@@ -349,7 +351,7 @@ class Container:
349
351
  "which has not been registered or set. To resolve this, ensure "
350
352
  f"that `{unresolved_parameter.name}` is registered before "
351
353
  f"attempting to use it."
352
- ) from None
354
+ ) from unresolved_exc
353
355
 
354
356
  # Check scope compatibility
355
357
  for sub_provider in scopes.values():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anydi
3
- Version: 0.48.0
3
+ Version: 0.48.1
4
4
  Summary: Dependency Injection library
5
5
  Keywords: dependency injection,dependencies,di,async,asyncio,application
6
6
  Author: Anton Ruhlov
@@ -1,6 +1,6 @@
1
1
  anydi/__init__.py,sha256=KjjYm-1yAFxiPYaMs1WRJMtxE0q_vdX7ZRLQR1fFGs8,567
2
2
  anydi/_async.py,sha256=KhRd3RmZFcwNDzrMm8ctA1gwrg-6m_7laECTYsZdF5k,1445
3
- anydi/_container.py,sha256=LQEmh4iTV9pJNuYhqWHc9h_6sR2E9wA2SOivWG5xzcc,31756
3
+ anydi/_container.py,sha256=fELFvxMrsrO2MQhAtnMmLKFxkvsaySx5ZwFGHy5KcOw,31860
4
4
  anydi/_context.py,sha256=_Xy8cTpRskb4cxTd-Fe-5NnIZyBe1DnovkofhdeUfmw,3020
5
5
  anydi/_decorators.py,sha256=F3yBeGQSz1EsulZaEvYn3cd6FEjJRMoyA6u1QCbEwcs,2813
6
6
  anydi/_module.py,sha256=QPvP27JndZkwl-FYUZWscJm6yfkNzjwoFGURyDhb6Pc,2582
@@ -26,7 +26,7 @@ anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
26
26
  anydi/ext/starlette/middleware.py,sha256=MxnzshAs-CMvjJp0r457k52MzBL8O4KAuClnF6exBdU,803
27
27
  anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  anydi/testing.py,sha256=waz0nO-MnfPGQLnPuDT0bdEdfqfmgkbsuFuxWfct6kw,5539
29
- anydi-0.48.0.dist-info/WHEEL,sha256=Pi5uDq5Fdo_Rr-HD5h9BiPn9Et29Y9Sh8NhcJNnFU1c,79
30
- anydi-0.48.0.dist-info/entry_points.txt,sha256=AgOcQYM5KyS4D37QcYb00tiid0QA-pD1VrjHHq4QAps,44
31
- anydi-0.48.0.dist-info/METADATA,sha256=tT8829LveFWBpSMJMkqdxmBkEQBKAFXzNZ4ZNTac7zI,4956
32
- anydi-0.48.0.dist-info/RECORD,,
29
+ anydi-0.48.1.dist-info/WHEEL,sha256=Pi5uDq5Fdo_Rr-HD5h9BiPn9Et29Y9Sh8NhcJNnFU1c,79
30
+ anydi-0.48.1.dist-info/entry_points.txt,sha256=AgOcQYM5KyS4D37QcYb00tiid0QA-pD1VrjHHq4QAps,44
31
+ anydi-0.48.1.dist-info/METADATA,sha256=X9swcb7pHvqntskN44YfhEJlCnR6wCGJWGwARHAPWfM,4956
32
+ anydi-0.48.1.dist-info/RECORD,,
File without changes