orionis 0.34.0__py3-none-any.whl → 0.35.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.
orionis/framework.py CHANGED
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.34.0"
8
+ VERSION = "0.35.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -5,7 +5,6 @@ from typing import Callable, Any, Dict
5
5
  from orionis.luminate.container.exception import OrionisContainerException, OrionisContainerValueError, OrionisContainerTypeError
6
6
  from orionis.luminate.container.types import Types
7
7
  from orionis.luminate.contracts.container.container_interface import IContainer
8
- from orionis.luminate.patterns.singleton import SingletonMeta
9
8
 
10
9
  BINDING = 'binding'
11
10
  TRANSIENT = 'transient'
@@ -13,7 +12,7 @@ SINGLETON = 'singleton'
13
12
  SCOPED = 'scoped'
14
13
  INSTANCE = 'instance'
15
14
 
16
- class Container(IContainer, metaclass=SingletonMeta):
15
+ class Container(IContainer):
17
16
  """
18
17
  Service container and dependency injection manager.
19
18
 
@@ -21,15 +20,23 @@ class Container(IContainer, metaclass=SingletonMeta):
21
20
  and different lifecycle types such as transient, singleton, and scoped.
22
21
  """
23
22
 
24
- def __init__(self):
25
- self._bindings = {}
26
- self._transients = {}
27
- self._singletons = {}
28
- self._scoped_services = {}
29
- self._instances = {}
30
- self._aliases = {}
31
- self._scoped_instances = {}
32
- self._validate_types = Types()
23
+ _instance = None
24
+ _lock = Lock()
25
+
26
+ def __new__(cls):
27
+ if cls._instance is None:
28
+ with cls._lock:
29
+ if cls._instance is None:
30
+ cls._instance = super().__new__(cls)
31
+ cls._instance._bindings = {}
32
+ cls._instance._transients = {}
33
+ cls._instance._singletons = {}
34
+ cls._instance._scoped_services = {}
35
+ cls._instance._instances = {}
36
+ cls._instance._aliases = {}
37
+ cls._instance._scoped_instances = {}
38
+ cls._instance._validate_types = Types()
39
+ return cls._instance
33
40
 
34
41
  def _newRequest(self) -> None:
35
42
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.34.0
3
+ Version: 0.35.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -1,6 +1,6 @@
1
1
  orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  orionis/cli_manager.py,sha256=9wNVJxB0HyqUbNesUvkwlsqTyUbZwK6R46iVLE5WVBQ,1715
3
- orionis/framework.py,sha256=lievfimHcqj63V6oBF1kmjmPa9BXOfh5FGYVnhzjS6M,1386
3
+ orionis/framework.py,sha256=yi_G0yBRZBMqZq6EpU_TALUIl_YJIRi7jJnkTGKBg14,1386
4
4
  orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/luminate/app.py,sha256=d_p--jxfOMbO2inEwWVTQONJxLKan0OaC5tOFu4SRg8,899
6
6
  orionis/luminate/orionis.py,sha256=qIuXGlM1lvoOAF0kLzoukk3aY3h-Etr1stbKEWqnUpY,3592
@@ -56,7 +56,7 @@ orionis/luminate/console/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
56
56
  orionis/luminate/console/scripts/management.py,sha256=J5gLXtvX8I1zdNk6sa23njR18D5s4LJXZK7ElK0sFzI,2868
57
57
  orionis/luminate/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  orionis/luminate/console/tasks/scheduler.py,sha256=CUmv9ap7zq3IWVTPtpPBZ-x166jsj1e0lTvw3didUQM,22692
59
- orionis/luminate/container/container.py,sha256=NcwlVswd_fbj9WUGVufS7HqBO06vJ6r1_MTaKDyI2VA,16100
59
+ orionis/luminate/container/container.py,sha256=5VvFiX4Keprk9nBszwtoJyFE6Mq-i4vulKJNLtFox8w,16417
60
60
  orionis/luminate/container/exception.py,sha256=ap1SqYEjQEEHXJJTNmL7V1jrmRjgT5_7geZ95MYkhMA,1691
61
61
  orionis/luminate/container/types.py,sha256=PbPNOJ8e4SGzCmu-zOmCQmDzt1b9I73v3fw_xzLq9RU,932
62
62
  orionis/luminate/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -147,9 +147,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
147
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
148
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
149
149
  tests/tools/test_reflection.py,sha256=dNN5p_xAosyEf0ddAElmmmTfhcTtBd4zBNl7qzgnsc0,5242
150
- orionis-0.34.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
151
- orionis-0.34.0.dist-info/METADATA,sha256=73kpkJv6oLnEREnoDXJTYBo9RN9y0GmrVT-rJPrW1yM,2978
152
- orionis-0.34.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
153
- orionis-0.34.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
154
- orionis-0.34.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
155
- orionis-0.34.0.dist-info/RECORD,,
150
+ orionis-0.35.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
151
+ orionis-0.35.0.dist-info/METADATA,sha256=PcCgSf-k5o-co38UH07jiuoAqMiXhBUDMaoIMbof1Bg,2978
152
+ orionis-0.35.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
153
+ orionis-0.35.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
154
+ orionis-0.35.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
155
+ orionis-0.35.0.dist-info/RECORD,,