runcloud-sdk 0.7.2__tar.gz → 0.7.3__tar.gz
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.
- {runcloud_sdk-0.7.2/runcloud_sdk.egg-info → runcloud_sdk-0.7.3}/PKG-INFO +1 -1
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/pyproject.toml +1 -1
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/client.py +1 -1
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/modal.py +3 -6
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3/runcloud_sdk.egg-info}/PKG-INFO +1 -1
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/tests/test_sdk.py +7 -2
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/LICENSE +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/README.md +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/__init__.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/__init__.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/blaxel.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/daytona.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/e2b.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/sprites.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud/compat/vercel.py +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud_sdk.egg-info/SOURCES.txt +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud_sdk.egg-info/dependency_links.txt +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/runcloud_sdk.egg-info/top_level.txt +0 -0
- {runcloud_sdk-0.7.2 → runcloud_sdk-0.7.3}/setup.cfg +0 -0
|
@@ -15,7 +15,7 @@ from typing import Any, Callable, Optional, Union
|
|
|
15
15
|
|
|
16
16
|
Transport = Callable[[str, str, Any], Any]
|
|
17
17
|
DEFAULT_API_URL = "https://api.run.cloud"
|
|
18
|
-
USER_AGENT = "runcloud-python/0.7.
|
|
18
|
+
USER_AGENT = "runcloud-python/0.7.3"
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class RunCloudError(Exception):
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import io
|
|
5
6
|
from typing import Optional
|
|
6
7
|
|
|
7
8
|
from runcloud.client import (
|
|
@@ -54,12 +55,8 @@ class Process:
|
|
|
54
55
|
return self.returncode
|
|
55
56
|
|
|
56
57
|
|
|
57
|
-
class _Reader:
|
|
58
|
-
|
|
59
|
-
self._value = value
|
|
60
|
-
|
|
61
|
-
def read(self):
|
|
62
|
-
return self._value
|
|
58
|
+
class _Reader(io.StringIO):
|
|
59
|
+
pass
|
|
63
60
|
|
|
64
61
|
|
|
65
62
|
class App:
|
|
@@ -72,7 +72,12 @@ class SDKTests(unittest.TestCase):
|
|
|
72
72
|
|
|
73
73
|
def test_compatibility_adapters_share_the_public_client(self):
|
|
74
74
|
app = modal.App.lookup("compat", client=self.client)
|
|
75
|
-
|
|
75
|
+
modal_sandbox = modal.Sandbox.create(app=app)
|
|
76
|
+
read_process = modal_sandbox.exec("echo ok")
|
|
77
|
+
self.assertEqual(read_process.stdout.read(), "ok\n")
|
|
78
|
+
self.assertEqual(read_process.wait(), 0)
|
|
79
|
+
iter_process = modal_sandbox.exec("echo ok")
|
|
80
|
+
self.assertEqual(list(iter_process.stdout), ["ok\n"])
|
|
76
81
|
self.assertEqual(
|
|
77
82
|
E2BSandbox.create(client=self.client).commands.run("echo ok").exit_code, 0
|
|
78
83
|
)
|
|
@@ -99,7 +104,7 @@ class SDKTests(unittest.TestCase):
|
|
|
99
104
|
Client(api_key="rc_live_test").request("GET", "/run-cloud/account")
|
|
100
105
|
|
|
101
106
|
request = urlopen.call_args.args[0]
|
|
102
|
-
self.assertEqual(request.get_header("User-agent"), "runcloud-python/0.7.
|
|
107
|
+
self.assertEqual(request.get_header("User-agent"), "runcloud-python/0.7.3")
|
|
103
108
|
|
|
104
109
|
|
|
105
110
|
class CredentialTests(unittest.TestCase):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|