xoscar 0.7.0rc1__cp312-cp312-macosx_11_0_arm64.whl → 0.7.1__cp312-cp312-macosx_11_0_arm64.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 xoscar might be problematic. Click here for more details.
- xoscar/__init__.py +1 -0
- xoscar/_utils.cpython-312-darwin.so +0 -0
- xoscar/api.py +34 -0
- xoscar/backends/message.cpython-312-darwin.so +0 -0
- xoscar/context.cpython-312-darwin.so +0 -0
- xoscar/core.cpython-312-darwin.so +0 -0
- xoscar/serialization/core.cpython-312-darwin.so +0 -0
- xoscar/utils.py +1 -1
- xoscar/virtualenv/core.py +1 -1
- xoscar/virtualenv/uv.py +17 -8
- {xoscar-0.7.0rc1.dist-info → xoscar-0.7.1.dist-info}/METADATA +1 -1
- {xoscar-0.7.0rc1.dist-info → xoscar-0.7.1.dist-info}/RECORD +14 -14
- {xoscar-0.7.0rc1.dist-info → xoscar-0.7.1.dist-info}/WHEEL +1 -1
- {xoscar-0.7.0rc1.dist-info → xoscar-0.7.1.dist-info}/top_level.txt +0 -0
xoscar/__init__.py
CHANGED
|
Binary file
|
xoscar/api.py
CHANGED
|
@@ -26,6 +26,7 @@ from numbers import Number
|
|
|
26
26
|
from typing import (
|
|
27
27
|
TYPE_CHECKING,
|
|
28
28
|
Any,
|
|
29
|
+
Awaitable,
|
|
29
30
|
Dict,
|
|
30
31
|
Generic,
|
|
31
32
|
List,
|
|
@@ -181,6 +182,39 @@ async def create_actor_pool(
|
|
|
181
182
|
)
|
|
182
183
|
|
|
183
184
|
|
|
185
|
+
async def wait_for(fut: Awaitable[Any], timeout: int | float | None = None) -> Any:
|
|
186
|
+
# asyncio.wait_for() on Xoscar actor call cannot work as expected,
|
|
187
|
+
# because when time out, the future will be cancelled, but an actor call will catch this error,
|
|
188
|
+
# and send a CancelMessage to the dest pool, if the CancelMessage cannot be processed correctly(e.g. the dest pool hangs),
|
|
189
|
+
# the time out will never happen. Thus this PR added a new API so that no matter the CancelMessage delivered or not,
|
|
190
|
+
# the timeout will happen as expected.
|
|
191
|
+
loop = asyncio.get_running_loop()
|
|
192
|
+
new_fut = loop.create_future()
|
|
193
|
+
task = asyncio.ensure_future(fut)
|
|
194
|
+
|
|
195
|
+
def on_done(f: asyncio.Future):
|
|
196
|
+
if new_fut.done():
|
|
197
|
+
return
|
|
198
|
+
if f.cancelled():
|
|
199
|
+
new_fut.cancel()
|
|
200
|
+
elif f.exception():
|
|
201
|
+
new_fut.set_exception(f.exception()) # type: ignore
|
|
202
|
+
else:
|
|
203
|
+
new_fut.set_result(f.result())
|
|
204
|
+
|
|
205
|
+
task.add_done_callback(on_done)
|
|
206
|
+
|
|
207
|
+
try:
|
|
208
|
+
return await asyncio.wait_for(new_fut, timeout)
|
|
209
|
+
except asyncio.TimeoutError:
|
|
210
|
+
if not task.done():
|
|
211
|
+
try:
|
|
212
|
+
task.cancel() # Try to cancel without waiting
|
|
213
|
+
except Exception:
|
|
214
|
+
logger.warning("Failed to cancel task", exc_info=True)
|
|
215
|
+
raise
|
|
216
|
+
|
|
217
|
+
|
|
184
218
|
def buffer_ref(address: str, buffer: Any) -> BufferRef:
|
|
185
219
|
"""
|
|
186
220
|
Init buffer ref according address and buffer.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
xoscar/utils.py
CHANGED
xoscar/virtualenv/core.py
CHANGED
xoscar/virtualenv/uv.py
CHANGED
|
@@ -51,12 +51,19 @@ class UVVirtualEnvManager(VirtualEnvManager):
|
|
|
51
51
|
# Handle known pip-related kwargs
|
|
52
52
|
if "index_url" in kwargs and kwargs["index_url"]:
|
|
53
53
|
cmd += ["-i", kwargs["index_url"]]
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
param_and_option = [
|
|
55
|
+
("extra_index_url", "--extra-index-url"),
|
|
56
|
+
("find_links", "-f"),
|
|
57
|
+
("trusted_host", "--trusted-host"),
|
|
58
|
+
]
|
|
59
|
+
for param, option in param_and_option:
|
|
60
|
+
if param in kwargs and kwargs[param]:
|
|
61
|
+
param_value = kwargs[param]
|
|
62
|
+
if isinstance(param_value, list):
|
|
63
|
+
for it in param_value:
|
|
64
|
+
cmd += [option, it]
|
|
65
|
+
else:
|
|
66
|
+
cmd += [option, param_value]
|
|
60
67
|
|
|
61
68
|
self._install_process = process = subprocess.Popen(cmd)
|
|
62
69
|
returncode = process.wait()
|
|
@@ -71,8 +78,10 @@ class UVVirtualEnvManager(VirtualEnvManager):
|
|
|
71
78
|
self._install_process.terminate()
|
|
72
79
|
self._install_process.wait()
|
|
73
80
|
|
|
74
|
-
def get_python_path(self) -> str:
|
|
75
|
-
|
|
81
|
+
def get_python_path(self) -> str | None:
|
|
82
|
+
if self.env_path.exists():
|
|
83
|
+
return str(self.env_path.joinpath("bin/python"))
|
|
84
|
+
return None
|
|
76
85
|
|
|
77
86
|
def get_lib_path(self) -> str:
|
|
78
87
|
return sysconfig.get_path("purelib", vars={"base": str(self.env_path)})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
xoscar-0.7.
|
|
2
|
-
xoscar-0.7.
|
|
3
|
-
xoscar-0.7.
|
|
4
|
-
xoscar-0.7.
|
|
1
|
+
xoscar-0.7.1.dist-info/RECORD,,
|
|
2
|
+
xoscar-0.7.1.dist-info/WHEEL,sha256=mP9bWt4ASeNWfyg7GBBbGbsOVFgblaN5WklJcvrSjIE,136
|
|
3
|
+
xoscar-0.7.1.dist-info/top_level.txt,sha256=vYlqqY4Nys8Thm1hePIuUv8eQePdULVWMmt7lXtX_ZA,21
|
|
4
|
+
xoscar-0.7.1.dist-info/METADATA,sha256=5R1jB3gMn9EcgS3E9H23PxbZQ2T1cSsdczaXBKXbD3k,9189
|
|
5
5
|
xoscar/_utils.pyx,sha256=frgVQ5xGp92jBKc4PsPmjOlVsXlKeHWtTOAMfHmBaII,7380
|
|
6
6
|
xoscar/backend.py,sha256=is436OPkZfSpQXaoqTRVta5eoye_pp45RFgCstAk2hU,1850
|
|
7
7
|
xoscar/core.pxd,sha256=I_C2ka7XryyGnnAVXUVm8xfS1gtIrCs6X-9rswgOcUU,1317
|
|
@@ -10,16 +10,16 @@ xoscar/context.pxd,sha256=qKa0OyDPZtVymftSh447m-RzFZgmz8rGqQBa7qlauvc,725
|
|
|
10
10
|
xoscar/batch.py,sha256=DpArS0L3WYJ_HVPG-6hSYEwoAFY1mY2-mlC4Jp5M_Dw,7872
|
|
11
11
|
xoscar/nvutils.py,sha256=qmW4mKLU0WB2yCs198ccQOgLL02zB7Fsa-AotO3NOmg,20412
|
|
12
12
|
xoscar/constants.py,sha256=QHHSREw6uWBBjQDCFqlNfTvBZgniJPGy42KSIsR8Fqw,787
|
|
13
|
-
xoscar/core.cpython-312-darwin.so,sha256=
|
|
14
|
-
xoscar/__init__.py,sha256=
|
|
15
|
-
xoscar/context.cpython-312-darwin.so,sha256=
|
|
16
|
-
xoscar/api.py,sha256=
|
|
17
|
-
xoscar/utils.py,sha256=
|
|
13
|
+
xoscar/core.cpython-312-darwin.so,sha256=nCfYoJ-d4tz7DPhIMta9LAe9-jvbHzPfFS3RfSVBZ5A,412760
|
|
14
|
+
xoscar/__init__.py,sha256=sy7Wtn2EuQZI0I4Az_MfsBVZm4G0DRj46qRyExgmnJk,1622
|
|
15
|
+
xoscar/context.cpython-312-darwin.so,sha256=HdEdxBhoynGX5BmLaAygfJ_zZLXbzMUOdB1u9xvSQQ4,213632
|
|
16
|
+
xoscar/api.py,sha256=zxNqOjGiTIKuAip9WJ0LOoM7yevD6P5rb-sLynpZ2Zo,14648
|
|
17
|
+
xoscar/utils.py,sha256=MaKiW4Vphwhh8c0yoqN8G8hbJr1zXgpf49EdvmGc1ZU,16500
|
|
18
18
|
xoscar/debug.py,sha256=9Z8SgE2WaKYQcyDo-5-DxEJQ533v7kWjrvCd28pSx3E,5069
|
|
19
19
|
xoscar/libcpp.pxd,sha256=DJqBxLFOKL4iRr9Kale5UH3rbvPRD1x5bTSOPHFpz9I,1147
|
|
20
20
|
xoscar/context.pyx,sha256=8CdgPnWcE9eOp3N600WgDQ03MCi8P73eUOGcfV7Zksg,10942
|
|
21
21
|
xoscar/errors.py,sha256=wBlQOKsXf0Fc4skN39tDie0YZT-VIAuLNRgoDl2pZcA,1241
|
|
22
|
-
xoscar/_utils.cpython-312-darwin.so,sha256=
|
|
22
|
+
xoscar/_utils.cpython-312-darwin.so,sha256=qUt8B5vNRWVI8uQpZCrGJFVRYX6YnE3c_-seFZyIBHI,169968
|
|
23
23
|
xoscar/core.pyx,sha256=phN-yYV0A0QI8WFi2jCu0nc4CnShTepfDi0V7ZrLYPY,22092
|
|
24
24
|
xoscar/driver.py,sha256=498fowtJr6b3FE8FIOA_Tc1Vwx88nfZw7p0FxrML0h4,1372
|
|
25
25
|
xoscar/profiling.py,sha256=BC5OF0HzSaXv8V7w-y-B8r5gV5DgxHFoTEIF6jCMioQ,8015
|
|
@@ -43,7 +43,7 @@ xoscar/serialization/exception.py,sha256=Jy8Lsk0z-VJyEUaWeuZIwkmxqaoB-nLKMa1D15C
|
|
|
43
43
|
xoscar/serialization/pyfury.py,sha256=sifOnVMYoS82PzZEkzkfxesmMHei23k5UAUUKUyoOYQ,1163
|
|
44
44
|
xoscar/serialization/core.pxd,sha256=k4RoJgX5E5LGs4jdCQ7vvcn26MabXbrWoWhkO49X6YI,985
|
|
45
45
|
xoscar/serialization/core.pyi,sha256=-pQARSj91rt3iU4ftWGFH6jYwsSKYCT_Ya7EJsaGEjg,1874
|
|
46
|
-
xoscar/serialization/core.cpython-312-darwin.so,sha256=
|
|
46
|
+
xoscar/serialization/core.cpython-312-darwin.so,sha256=B2hSKtfa_E60cPnW-5EIOmcDDW_GcKN-bNGHrn9O8fg,365944
|
|
47
47
|
xoscar/serialization/__init__.py,sha256=v76XC2OQLp-Yk4_U3_IVguEylMeyRw1UrkU_DPDMh0U,856
|
|
48
48
|
xoscar/serialization/numpy.py,sha256=5Kem87CvpJmzUMp3QHk4WeHU30FoQWTJJP2SwIcaQG0,2919
|
|
49
49
|
xoscar/serialization/cuda.py,sha256=iFUEnN4SiquBIhyieyOrfw3TnKnW-tU_vYgqOxO_DrA,3758
|
|
@@ -58,7 +58,7 @@ xoscar/backends/__init__.py,sha256=VHEBQcUWM5bj027W8EUf9PiJUAP7JoMrRw3Tsvy5ySw,6
|
|
|
58
58
|
xoscar/backends/core.py,sha256=EH-fHlV9x3bnruEHaUtGYO7osKLfLJ4AQHtuzA_mr2g,10857
|
|
59
59
|
xoscar/backends/context.py,sha256=XfDPG2eDhAhE6hWBEkEsHTnyyOYN9R3houlMjAL7BFw,16329
|
|
60
60
|
xoscar/backends/router.py,sha256=MVl5naz-FYf-Wla7XRn3kRxOpWV0SjKDsKNluifVA8M,10532
|
|
61
|
-
xoscar/backends/message.cpython-312-darwin.so,sha256
|
|
61
|
+
xoscar/backends/message.cpython-312-darwin.so,sha256=-KkkzbNj4nmv-DjuyLekdM9hjqiv3oaWvdnq_cKmSUw,351584
|
|
62
62
|
xoscar/backends/message.pyx,sha256=krGVtZ1YDaZX8yWhaNHwZiudQooLvcGlw6x3Sq7jxjE,19685
|
|
63
63
|
xoscar/backends/pool.py,sha256=nrh8qobaukkjUOOOTR9t90i-wbXlgma3TNRjvwkwmcg,60528
|
|
64
64
|
xoscar/backends/indigen/backend.py,sha256=znl_fZzWGEtLH8hZ9j9Kkf0fva25jEem2_KO7I1RVvc,1612
|
|
@@ -85,5 +85,5 @@ xoscar/aio/lru.py,sha256=rpXCqSLtPV5xnWtd6uDwQQFGgIPEgvmWEQDkPNUx9cM,6311
|
|
|
85
85
|
xoscar/aio/parallelism.py,sha256=VSsjk8wP-Bw7tLeUsTyLVNgp91thjxEfE3pCrw_vF5Q,1293
|
|
86
86
|
xoscar/aio/base.py,sha256=9j0f1piwfE5R5GIvV212vSD03ixdaeSzSSsO2kxJZVE,2249
|
|
87
87
|
xoscar/virtualenv/__init__.py,sha256=65t9_X1DvbanNjFy366SiiWZrRTpa9SXWMXPmqayE-4,1117
|
|
88
|
-
xoscar/virtualenv/core.py,sha256=
|
|
89
|
-
xoscar/virtualenv/uv.py,sha256=
|
|
88
|
+
xoscar/virtualenv/core.py,sha256=Ld5bSkKp8ywekGuUq61uyms5I8Hm1WdbkbLxmCw-ML0,1342
|
|
89
|
+
xoscar/virtualenv/uv.py,sha256=rVurn1PKlvR22Bm_F1uouIb1eMkB_wr-_29dBvMl7bo,3182
|
|
File without changes
|