orionis 0.219.0__py3-none-any.whl → 0.221.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 +1 -1
- orionis/luminate/support/async_io/async_coroutine.py +1 -4
- {orionis-0.219.0.dist-info → orionis-0.221.0.dist-info}/METADATA +1 -1
- {orionis-0.219.0.dist-info → orionis-0.221.0.dist-info}/RECORD +9 -9
- tests/support/async_io/test_async_coroutine.py +9 -6
- {orionis-0.219.0.dist-info → orionis-0.221.0.dist-info}/LICENCE +0 -0
- {orionis-0.219.0.dist-info → orionis-0.221.0.dist-info}/WHEEL +0 -0
- {orionis-0.219.0.dist-info → orionis-0.221.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.219.0.dist-info → orionis-0.221.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
@@ -37,12 +37,9 @@ class AsyncCoroutine(IAsyncCoroutine):
|
|
37
37
|
try:
|
38
38
|
loop = asyncio.get_running_loop()
|
39
39
|
except RuntimeError:
|
40
|
-
# No hay loop activo: ejecutamos directamente
|
41
40
|
return asyncio.run(coro)
|
42
41
|
|
43
42
|
if loop.is_running():
|
44
|
-
|
45
|
-
return asyncio.ensure_future(coro) # devuelve un Future (debes await si estás en async)
|
43
|
+
return asyncio.ensure_future(coro)
|
46
44
|
else:
|
47
|
-
# Estamos en código síncrono, pero con acceso al loop
|
48
45
|
return loop.run_until_complete(coro)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/console.py,sha256=4gYWxf0fWYgJ4RKwARvnTPh06FL3GJ6SAZ7R2NzOICw,1342
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=RFEO1x9Wd-BbDE_qVIBkiuZQ8NdtHQdta3LrENjbDQ4,1458
|
4
4
|
orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
orionis/installer/manager.py,sha256=Li4TVziRXWfum02xNG4JHwbnLk-u8xzHjdqKz-D894k,2755
|
6
6
|
orionis/installer/output.py,sha256=7O9qa2xtXMB_4ZvVi-Klneom9YazwygAd_4uYAoxhbU,8548
|
@@ -162,7 +162,7 @@ orionis/luminate/services/log/log_service.py,sha256=jrCrKz7Uj6n_ri-v5A4YOILQGUQ9
|
|
162
162
|
orionis/luminate/support/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
163
163
|
orionis/luminate/support/adapters/dot_dict.py,sha256=FVHfBuAGTTVMjNG01Fix645fRNKKUMmNx61pYkxPL5c,1253
|
164
164
|
orionis/luminate/support/async_io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
165
|
-
orionis/luminate/support/async_io/async_coroutine.py,sha256=
|
165
|
+
orionis/luminate/support/async_io/async_coroutine.py,sha256=gOs9S_ath2BY6NV1s9whD0JXJa4qeRaaZgFyHqoqTm0,1808
|
166
166
|
orionis/luminate/support/async_io/contracts/async_coroutine.py,sha256=D2NhVwPO_TKQ9UjLn61aeC0n7GmIXHtVpdel8pruXcI,763
|
167
167
|
orionis/luminate/support/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
168
168
|
orionis/luminate/support/inspection/container_integrity.py,sha256=6d9FsGk-Rm1AXgqBS3Nww49dR7n1ptXTTNyGUuBHgNY,10111
|
@@ -216,7 +216,7 @@ tests/support/adapters/test_doct_dict.py,sha256=Rh0wUZLBErqrzwoRSUa7t1rpRm-Qp-HR
|
|
216
216
|
tests/support/adapters/fakes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
217
217
|
tests/support/adapters/fakes/fake_dict.py,sha256=KD48_xBc8pqj3LAe1_v1esu-1Fdz8fL5eZ70LSqkcbg,393
|
218
218
|
tests/support/async_io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
219
|
-
tests/support/async_io/test_async_coroutine.py,sha256=
|
219
|
+
tests/support/async_io/test_async_coroutine.py,sha256=lxbkcJJV-B-pxexSxNpmFypFcBK3zLPI18ySngZI3zk,1584
|
220
220
|
tests/support/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
221
221
|
tests/support/inspection/test_reflection_abstract.py,sha256=6w8vm8H_fR4Z-KYjQGm8bq-HcetlpQl0EsDmDy3WzQ8,9311
|
222
222
|
tests/support/inspection/test_reflection_concrete.py,sha256=3BWSU7MkFEv2UgAVAwhiaMrzEwAyDBBJCa6edOENKSU,6782
|
@@ -235,9 +235,9 @@ tests/support/parsers/fakes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
235
235
|
tests/support/parsers/fakes/fake_custom_error.py,sha256=BD8tQPhmIYFYVcaeMpEQ6uK1d6pcU4EGbwRkVfCZp7c,802
|
236
236
|
tests/support/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
237
237
|
tests/support/standard/test_std.py,sha256=bJ5LV_OKEEZa_Bk3PTk9Kapk6qECLzcKf0hfR_x2QqM,2042
|
238
|
-
orionis-0.
|
239
|
-
orionis-0.
|
240
|
-
orionis-0.
|
241
|
-
orionis-0.
|
242
|
-
orionis-0.
|
243
|
-
orionis-0.
|
238
|
+
orionis-0.221.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
239
|
+
orionis-0.221.0.dist-info/METADATA,sha256=HjWAR1ektEdMZK8i6uLekCdmYdquq6dt5HxTkEZgzag,3003
|
240
|
+
orionis-0.221.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
241
|
+
orionis-0.221.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
|
242
|
+
orionis-0.221.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
243
|
+
orionis-0.221.0.dist-info/RECORD,,
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from orionis.luminate.support.async_io.async_coroutine import AsyncCoroutine
|
2
2
|
from orionis.luminate.test.test_case import TestCase
|
3
|
-
from tests.support.adapters.fakes.fake_dict import fake_dict
|
4
3
|
|
5
4
|
class TestsAsyncCoroutine(TestCase):
|
6
5
|
|
@@ -16,20 +15,24 @@ class TestsAsyncCoroutine(TestCase):
|
|
16
15
|
result = await AsyncCoroutine.execute(sample_coroutine())
|
17
16
|
self.assertEqual(result, "Hello, World!")
|
18
17
|
|
19
|
-
|
18
|
+
def testExecuteWithoutActiveEventLoop(self):
|
20
19
|
"""
|
21
20
|
Test the execution of a coroutine without an active event loop.
|
22
21
|
This test simulates a scenario where the coroutine is executed in a synchronous context without an active event loop.
|
23
22
|
"""
|
24
23
|
async def sample_coroutine():
|
25
24
|
return "Hello, World!"
|
26
|
-
|
25
|
+
|
26
|
+
result = AsyncCoroutine.execute(sample_coroutine())
|
27
27
|
self.assertEqual(result, "Hello, World!")
|
28
28
|
|
29
|
-
|
29
|
+
def testExecuteWithNonCoroutine(self):
|
30
30
|
"""
|
31
31
|
Test the execution of a non-coroutine object.
|
32
32
|
This test checks that a TypeError is raised when a non-coroutine object is passed to the execute method.
|
33
33
|
"""
|
34
|
-
|
35
|
-
|
34
|
+
def sample_no_coroutine():
|
35
|
+
return "Hello, World!"
|
36
|
+
|
37
|
+
with self.assertRaises(TypeError):
|
38
|
+
AsyncCoroutine.execute(sample_no_coroutine())
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|