anydi 0.44.0__tar.gz → 0.44.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 (96) hide show
  1. {anydi-0.44.0 → anydi-0.44.1}/PKG-INFO +1 -1
  2. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/_utils.py +3 -2
  3. {anydi-0.44.0 → anydi-0.44.1}/docs/usage.md +1 -1
  4. {anydi-0.44.0 → anydi-0.44.1}/pyproject.toml +2 -2
  5. {anydi-0.44.0 → anydi-0.44.1}/uv.lock +1 -1
  6. {anydi-0.44.0 → anydi-0.44.1}/.editorconfig +0 -0
  7. {anydi-0.44.0 → anydi-0.44.1}/.github/workflows/ci.yml +0 -0
  8. {anydi-0.44.0 → anydi-0.44.1}/.gitignore +0 -0
  9. {anydi-0.44.0 → anydi-0.44.1}/.readthedocs.yaml +0 -0
  10. {anydi-0.44.0 → anydi-0.44.1}/LICENSE +0 -0
  11. {anydi-0.44.0 → anydi-0.44.1}/Makefile +0 -0
  12. {anydi-0.44.0 → anydi-0.44.1}/README.md +0 -0
  13. {anydi-0.44.0 → anydi-0.44.1}/anydi/__init__.py +0 -0
  14. {anydi-0.44.0 → anydi-0.44.1}/anydi/_async.py +0 -0
  15. {anydi-0.44.0 → anydi-0.44.1}/anydi/_container.py +0 -0
  16. {anydi-0.44.0 → anydi-0.44.1}/anydi/_context.py +0 -0
  17. {anydi-0.44.0 → anydi-0.44.1}/anydi/_decorators.py +0 -0
  18. {anydi-0.44.0 → anydi-0.44.1}/anydi/_module.py +0 -0
  19. {anydi-0.44.0 → anydi-0.44.1}/anydi/_provider.py +0 -0
  20. {anydi-0.44.0 → anydi-0.44.1}/anydi/_scan.py +0 -0
  21. {anydi-0.44.0 → anydi-0.44.1}/anydi/_scope.py +0 -0
  22. {anydi-0.44.0 → anydi-0.44.1}/anydi/_typing.py +0 -0
  23. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/__init__.py +0 -0
  24. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/_utils.py +0 -0
  25. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/__init__.py +0 -0
  26. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/_container.py +0 -0
  27. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/_settings.py +0 -0
  28. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/apps.py +0 -0
  29. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/middleware.py +0 -0
  30. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/ninja/__init__.py +0 -0
  31. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/ninja/_operation.py +0 -0
  32. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/django/ninja/_signature.py +0 -0
  33. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/fastapi.py +0 -0
  34. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/faststream.py +0 -0
  35. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/pydantic_settings.py +0 -0
  36. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/pytest_plugin.py +0 -0
  37. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/starlette/__init__.py +0 -0
  38. {anydi-0.44.0 → anydi-0.44.1}/anydi/ext/starlette/middleware.py +0 -0
  39. {anydi-0.44.0 → anydi-0.44.1}/anydi/py.typed +0 -0
  40. {anydi-0.44.0 → anydi-0.44.1}/anydi/testing.py +0 -0
  41. {anydi-0.44.0 → anydi-0.44.1}/docs/examples/basic.md +0 -0
  42. {anydi-0.44.0 → anydi-0.44.1}/docs/extensions/django.md +0 -0
  43. {anydi-0.44.0 → anydi-0.44.1}/docs/extensions/fastapi.md +0 -0
  44. {anydi-0.44.0 → anydi-0.44.1}/docs/extensions/faststream.md +0 -0
  45. {anydi-0.44.0 → anydi-0.44.1}/docs/extensions/pydantic_settings.md +0 -0
  46. {anydi-0.44.0 → anydi-0.44.1}/docs/index.md +0 -0
  47. {anydi-0.44.0 → anydi-0.44.1}/mkdocs.yml +0 -0
  48. {anydi-0.44.0 → anydi-0.44.1}/tests/__init__.py +0 -0
  49. {anydi-0.44.0 → anydi-0.44.1}/tests/conftest.py +0 -0
  50. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/__init__.py +0 -0
  51. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/__init__.py +0 -0
  52. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/api/__init__.py +0 -0
  53. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/api/router.py +0 -0
  54. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/api/test_router.py +0 -0
  55. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/api/urls.py +0 -0
  56. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/conftest.py +0 -0
  57. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/container.py +0 -0
  58. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/scan/__init__.py +0 -0
  59. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/services.py +0 -0
  60. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/settings.py +0 -0
  61. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/test_views.py +0 -0
  62. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/urls.py +0 -0
  63. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/django/views.py +0 -0
  64. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/fastapi/__init__.py +0 -0
  65. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/fastapi/app.py +0 -0
  66. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/fastapi/conftest.py +0 -0
  67. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/fastapi/test_ext.py +0 -0
  68. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/fastapi/test_routes.py +0 -0
  69. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/faststream/__init__.py +0 -0
  70. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/faststream/test_ext.py +0 -0
  71. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/faststream/test_subscribers.py +0 -0
  72. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/fixtures.py +0 -0
  73. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/starlette/__init__.py +0 -0
  74. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/starlette/app.py +0 -0
  75. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/starlette/conftest.py +0 -0
  76. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/starlette/test_routes.py +0 -0
  77. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/test_pydantic.py +0 -0
  78. {anydi-0.44.0 → anydi-0.44.1}/tests/ext/test_pytest_plugin.py +0 -0
  79. {anydi-0.44.0 → anydi-0.44.1}/tests/fixtures.py +0 -0
  80. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/__init__.py +0 -0
  81. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/__init__.py +0 -0
  82. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a1/__init__.py +0 -0
  83. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a1/handlers.py +0 -0
  84. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a2/__init__.py +0 -0
  85. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a2/a21/__init__.py +0 -0
  86. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a2/a21/handlers.py +0 -0
  87. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a3/__init__.py +0 -0
  88. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/a/a3/handlers.py +0 -0
  89. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/b/__init__.py +0 -0
  90. {anydi-0.44.0 → anydi-0.44.1}/tests/scan_app/b/handlers.py +0 -0
  91. {anydi-0.44.0 → anydi-0.44.1}/tests/test_container.py +0 -0
  92. {anydi-0.44.0 → anydi-0.44.1}/tests/test_decorators.py +0 -0
  93. {anydi-0.44.0 → anydi-0.44.1}/tests/test_module.py +0 -0
  94. {anydi-0.44.0 → anydi-0.44.1}/tests/test_scan.py +0 -0
  95. {anydi-0.44.0 → anydi-0.44.1}/tests/test_testing.py +0 -0
  96. {anydi-0.44.0 → anydi-0.44.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anydi
3
- Version: 0.44.0
3
+ Version: 0.44.1
4
4
  Summary: Dependency Injection library
5
5
  Project-URL: Repository, https://github.com/antonrh/anydi
6
6
  Author-email: Anton Ruhlov <antonruhlov@gmail.com>
@@ -62,15 +62,16 @@ def register_components(container: Container) -> None:
62
62
  def inject_urlpatterns(container: Container, *, urlconf: str) -> None:
63
63
  """Auto-inject the container into views."""
64
64
  resolver = get_resolver(urlconf)
65
+ injected_urlpatterns = []
65
66
  for pattern in iter_urlpatterns(resolver.url_patterns):
66
67
  # Skip already injected views
67
- if hasattr(pattern.callback, "_injected"):
68
+ if pattern.lookup_str in injected_urlpatterns:
68
69
  continue
69
70
  # Skip django-ninja views
70
71
  if pattern.lookup_str.startswith("ninja."):
71
72
  continue # pragma: no cover
72
73
  pattern.callback = container.inject(pattern.callback)
73
- pattern.callback._injected = True # type: ignore
74
+ injected_urlpatterns.append(pattern.lookup_str)
74
75
 
75
76
 
76
77
  def iter_urlpatterns(
@@ -178,7 +178,7 @@ from typing import Iterator
178
178
 
179
179
  from anydi import Container
180
180
 
181
- container = Container() # Non-strict mode
181
+ container = Container()
182
182
 
183
183
  @container.provider(scope="singleton")
184
184
  def db() -> Iterator[Database]:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "anydi"
3
- version = "0.44.0"
3
+ version = "0.44.1"
4
4
  description = "Dependency Injection library"
5
5
  authors = [{ name = "Anton Ruhlov", email = "antonruhlov@gmail.com" }]
6
6
  requires-python = "~=3.9"
@@ -137,7 +137,7 @@ omit = [
137
137
  ]
138
138
 
139
139
  [tool.bumpversion]
140
- current_version = "0.44.0"
140
+ current_version = "0.44.1"
141
141
  parse = """(?x)
142
142
  (?P<major>0|[1-9]\\d*)\\.
143
143
  (?P<minor>0|[1-9]\\d*)\\.
@@ -13,7 +13,7 @@ wheels = [
13
13
 
14
14
  [[package]]
15
15
  name = "anydi"
16
- version = "0.43.0"
16
+ version = "0.44.1"
17
17
  source = { editable = "." }
18
18
  dependencies = [
19
19
  { name = "anyio" },
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
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