anydi 0.44.0__py3-none-any.whl → 0.44.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.
@@ -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(
@@ -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>
@@ -19,7 +19,7 @@ anydi/ext/pytest_plugin.py,sha256=IoP6XKuGLGLd2Xlpfttc3mI4pxCm2WQLE7x_a7asbv4,47
19
19
  anydi/ext/django/__init__.py,sha256=QI1IABCVgSDTUoh7M9WMECKXwB3xvh04HfQ9TOWw1Mk,223
20
20
  anydi/ext/django/_container.py,sha256=cxVoYQG16WP0S_Yv4TnLwuaaT7NVEOhLWO-YdALJUb4,418
21
21
  anydi/ext/django/_settings.py,sha256=NsYbFBeslqw_tcXCn2b2gKnSp7eb64DM4dRc4tn_eiw,808
22
- anydi/ext/django/_utils.py,sha256=N1DZlY5RHxbb7TUWH-BWWC78GzUX_a1oYEZ8hT8WgaE,2663
22
+ anydi/ext/django/_utils.py,sha256=sYfUgBV9azddWYB4vNaZadDXcv_MiU-wSfVKV-TZDrE,2695
23
23
  anydi/ext/django/apps.py,sha256=YLL1uU6dSQ3uf3GB0VHzPW_eLuB1j9h6pv8EdAutMqo,2725
24
24
  anydi/ext/django/middleware.py,sha256=5OUdp0OWRozyW338Sq04BDhacaFlyUTTOduS_7EwCTA,854
25
25
  anydi/ext/django/ninja/__init__.py,sha256=4J0zoHPK9itbTVrjjvLX6Ftrsb2ND8bITqNDIJzEhks,520
@@ -27,8 +27,8 @@ anydi/ext/django/ninja/_operation.py,sha256=wk5EOjLY3KVIHk9jMCGsFsja9-dQmMOpLpHX
27
27
  anydi/ext/django/ninja/_signature.py,sha256=UVLmKpYvH1fNb9C7ffP50KCmh0BE6unHegfss5dvpVU,2261
28
28
  anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  anydi/ext/starlette/middleware.py,sha256=MxnzshAs-CMvjJp0r457k52MzBL8O4KAuClnF6exBdU,803
30
- anydi-0.44.0.dist-info/METADATA,sha256=c5w1BMcgZzQpKFh2pQlRYq602OKr56x1kMt9gy5m31U,4957
31
- anydi-0.44.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
32
- anydi-0.44.0.dist-info/entry_points.txt,sha256=Nklo9f3Oe4AkNsEgC4g43nCJ-23QDngZSVDNRMdaILI,43
33
- anydi-0.44.0.dist-info/licenses/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
34
- anydi-0.44.0.dist-info/RECORD,,
30
+ anydi-0.44.1.dist-info/METADATA,sha256=z2h5a-aEnFi-mMpUnsXTJuJAQ_KSllQS6rliMo0RofE,4957
31
+ anydi-0.44.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
32
+ anydi-0.44.1.dist-info/entry_points.txt,sha256=Nklo9f3Oe4AkNsEgC4g43nCJ-23QDngZSVDNRMdaILI,43
33
+ anydi-0.44.1.dist-info/licenses/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
34
+ anydi-0.44.1.dist-info/RECORD,,
File without changes