modern-di 0.15.1__py3-none-any.whl → 0.16.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.

Potentially problematic release.


This version of modern-di might be problematic. Click here for more details.

modern_di/container.py CHANGED
@@ -4,6 +4,7 @@ import types
4
4
  import typing
5
5
 
6
6
  from modern_di.provider_state import ProviderState
7
+ from modern_di.scope import Scope
7
8
 
8
9
 
9
10
  if typing.TYPE_CHECKING:
@@ -27,7 +28,7 @@ class Container(contextlib.AbstractAsyncContextManager["Container"], contextlib.
27
28
  def __init__(
28
29
  self,
29
30
  *,
30
- scope: enum.IntEnum,
31
+ scope: enum.IntEnum = Scope.APP,
31
32
  parent_container: typing.Optional["Container"] = None,
32
33
  context: dict[str, typing.Any] | None = None,
33
34
  use_threading_lock: bool = True,
@@ -162,5 +163,9 @@ class Container(contextlib.AbstractAsyncContextManager["Container"], contextlib.
162
163
  self.sync_close()
163
164
 
164
165
  def __deepcopy__(self, *_: object, **__: object) -> "typing_extensions.Self":
165
- """Hack for FastStream to prevent cloning object."""
166
+ """Hack to prevent cloning object."""
167
+ return self
168
+
169
+ def __copy__(self, *_: object, **__: object) -> "typing_extensions.Self":
170
+ """Hack to prevent cloning object."""
166
171
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modern-di
3
- Version: 0.15.1
3
+ Version: 0.16.0
4
4
  Summary: Dependency Injection framework with IOC-container and scopes
5
5
  Project-URL: repository, https://github.com/modern-python/modern-di
6
6
  Project-URL: docs, https://modern-di.readthedocs.io
@@ -1,5 +1,5 @@
1
1
  modern_di/__init__.py,sha256=L01VkzSJiV0d0FPrh1DZ-Wy5mUmoG6X-oLz7xYxtehI,194
2
- modern_di/container.py,sha256=51ULvvP2IqFw4ksLPlqBivjUfh3CuEWw5grs7QmC7IQ,5400
2
+ modern_di/container.py,sha256=sNHUGk8Y_eoQSLsSc-ZOqUBP2edsZwpifigcBH2Ka7g,5576
3
3
  modern_di/graph.py,sha256=X60wtG3Mqus_5YZNiZlQuXoHODBp7rYl_IHJs7GzSQM,1356
4
4
  modern_di/provider_state.py,sha256=oU08QnMr0yhIZKkz0Pee8_RnWtETDE9ux4JB83qhwTI,1358
5
5
  modern_di/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -20,6 +20,6 @@ modern_di/providers/object.py,sha256=Sm0mb3Ua7cZ5Ay65fLvl7fnJDSQrQZwvzio3lkkXP2A
20
20
  modern_di/providers/resource.py,sha256=jEP6Ppr0gmdgWaQGF4sU2PIdt5xSzxcSDubC_IqxE1k,4559
21
21
  modern_di/providers/selector.py,sha256=RQbHD2-Liw-TGqu6UELbfCzXYuqxiO_Mg1tLyF3mKQo,1419
22
22
  modern_di/providers/singleton.py,sha256=gfJvAQ7L0JBYlhrzKvaYYDiWo8MPbp0CCU8hGtuzs7U,2357
23
- modern_di-0.15.1.dist-info/METADATA,sha256=JN24gTb9MazE-8UmP18tjsfhs5moEjB5VUtDxqeOVYE,3382
24
- modern_di-0.15.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
25
- modern_di-0.15.1.dist-info/RECORD,,
23
+ modern_di-0.16.0.dist-info/METADATA,sha256=QyyOUsYG55pqOIq3IUZ0u58sorcZxoe41MaZDEMKOKE,3382
24
+ modern_di-0.16.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
25
+ modern_di-0.16.0.dist-info/RECORD,,