anydi 0.48.0__tar.gz → 0.48.1__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 (31) hide show
  1. {anydi-0.48.0 → anydi-0.48.1}/PKG-INFO +1 -1
  2. {anydi-0.48.0 → anydi-0.48.1}/anydi/_container.py +4 -2
  3. {anydi-0.48.0 → anydi-0.48.1}/pyproject.toml +2 -2
  4. {anydi-0.48.0 → anydi-0.48.1}/README.md +0 -0
  5. {anydi-0.48.0 → anydi-0.48.1}/anydi/__init__.py +0 -0
  6. {anydi-0.48.0 → anydi-0.48.1}/anydi/_async.py +0 -0
  7. {anydi-0.48.0 → anydi-0.48.1}/anydi/_context.py +0 -0
  8. {anydi-0.48.0 → anydi-0.48.1}/anydi/_decorators.py +0 -0
  9. {anydi-0.48.0 → anydi-0.48.1}/anydi/_module.py +0 -0
  10. {anydi-0.48.0 → anydi-0.48.1}/anydi/_provider.py +0 -0
  11. {anydi-0.48.0 → anydi-0.48.1}/anydi/_scan.py +0 -0
  12. {anydi-0.48.0 → anydi-0.48.1}/anydi/_scope.py +0 -0
  13. {anydi-0.48.0 → anydi-0.48.1}/anydi/_typing.py +0 -0
  14. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/__init__.py +0 -0
  15. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/__init__.py +0 -0
  16. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/_container.py +0 -0
  17. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/_settings.py +0 -0
  18. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/_utils.py +0 -0
  19. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/apps.py +0 -0
  20. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/middleware.py +0 -0
  21. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/ninja/__init__.py +0 -0
  22. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/ninja/_operation.py +0 -0
  23. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/django/ninja/_signature.py +0 -0
  24. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/fastapi.py +0 -0
  25. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/faststream.py +0 -0
  26. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/pydantic_settings.py +0 -0
  27. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/pytest_plugin.py +0 -0
  28. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/starlette/__init__.py +0 -0
  29. {anydi-0.48.0 → anydi-0.48.1}/anydi/ext/starlette/middleware.py +0 -0
  30. {anydi-0.48.0 → anydi-0.48.1}/anydi/py.typed +0 -0
  31. {anydi-0.48.0 → anydi-0.48.1}/anydi/testing.py +0 -0
@@ -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
@@ -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
  [project]
2
2
  name = "anydi"
3
- version = "0.48.0"
3
+ version = "0.48.1"
4
4
  description = "Dependency Injection library"
5
5
  authors = [{ name = "Anton Ruhlov", email = "antonruhlov@gmail.com" }]
6
6
  requires-python = "~=3.9"
@@ -141,7 +141,7 @@ omit = [
141
141
  ]
142
142
 
143
143
  [tool.bumpversion]
144
- current_version = "0.48.0"
144
+ current_version = "0.48.1"
145
145
  parse = """(?x)
146
146
  (?P<major>0|[1-9]\\d*)\\.
147
147
  (?P<minor>0|[1-9]\\d*)\\.
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