opencomputer-sdk 1.1.0__tar.gz → 1.2.0__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.
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/.gitignore +1 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/PKG-INFO +7 -3
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/README.md +4 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/__init__.py +14 -1
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/version.py +1 -1
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/pyproject.toml +2 -2
- opencomputer_sdk-1.2.0/tests/test_deprecation.py +37 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/run_all_tests.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/stream_demo.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_commands.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_concurrent.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_declarative_images.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_default_template.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_disk_size.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_domain_tls.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_environment.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_exec.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_file_ops.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_large_files.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_multi_template.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_python_sdk.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_reconnect.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_secret_store_fork.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_secretstore.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_shell.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/examples/test_timeout.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/agent.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/browser.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/commands.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/exec.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/filesystem.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/image.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/mounts.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/project.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/pty.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/sandbox.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/shell.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/snapshot.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/sse.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/template.py +0 -0
- {opencomputer_sdk-1.1.0 → opencomputer_sdk-1.2.0}/opencomputer/usage.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: opencomputer-sdk
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: Python SDK for
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Deprecated: Python SDK for the retired OpenComputer sandbox platform. 1.2.0 is the final release.
|
|
5
5
|
Project-URL: Homepage, https://github.com/diggerhq/opensandbox
|
|
6
6
|
Project-URL: Repository, https://github.com/diggerhq/opensandbox
|
|
7
7
|
Project-URL: Documentation, https://github.com/diggerhq/opensandbox/tree/main/sdks/python
|
|
@@ -9,7 +9,7 @@ Project-URL: Issues, https://github.com/diggerhq/opensandbox/issues
|
|
|
9
9
|
Author: OpenComputer
|
|
10
10
|
License-Expression: MIT
|
|
11
11
|
Keywords: cloud,code-execution,containers,opencomputer,sandbox
|
|
12
|
-
Classifier: Development Status ::
|
|
12
|
+
Classifier: Development Status :: 7 - Inactive
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
14
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -28,6 +28,10 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
|
|
29
29
|
# opencomputer
|
|
30
30
|
|
|
31
|
+
> **Deprecated.** `opencomputer-sdk` 1.2.0 is the final release; the package receives no further updates. It is a client for the OpenComputer sandbox platform, which is shut down. Importing `opencomputer` emits a `FutureWarning`.
|
|
32
|
+
>
|
|
33
|
+
> There is no Python replacement. For [Serverless Agents](https://opencomputer.dev/agents) call the [management API](https://opencomputer.dev/agents/api) over HTTP, or use the TypeScript client `@opencomputer/sdk/agents` (`npm install @opencomputer/sdk`). Pinning `opencomputer-sdk<1.2` avoids the warning.
|
|
34
|
+
|
|
31
35
|
Python SDK for [OpenComputer](https://github.com/diggerhq/opensandbox) — cloud sandbox platform.
|
|
32
36
|
|
|
33
37
|
## Install
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# opencomputer
|
|
2
2
|
|
|
3
|
+
> **Deprecated.** `opencomputer-sdk` 1.2.0 is the final release; the package receives no further updates. It is a client for the OpenComputer sandbox platform, which is shut down. Importing `opencomputer` emits a `FutureWarning`.
|
|
4
|
+
>
|
|
5
|
+
> There is no Python replacement. For [Serverless Agents](https://opencomputer.dev/agents) call the [management API](https://opencomputer.dev/agents/api) over HTTP, or use the TypeScript client `@opencomputer/sdk/agents` (`npm install @opencomputer/sdk`). Pinning `opencomputer-sdk<1.2` avoids the warning.
|
|
6
|
+
|
|
3
7
|
Python SDK for [OpenComputer](https://github.com/diggerhq/opensandbox) — cloud sandbox platform.
|
|
4
8
|
|
|
5
9
|
## Install
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
"""OpenComputer Python SDK - cloud sandbox platform."""
|
|
1
|
+
"""OpenComputer Python SDK - cloud sandbox platform. Deprecated: 1.2.0 is the final release."""
|
|
2
|
+
|
|
3
|
+
import warnings as _warnings
|
|
4
|
+
|
|
5
|
+
#: Shown once per process, on the first ``import opencomputer``. A
|
|
6
|
+
#: FutureWarning, not a DeprecationWarning: Python's default filters show it
|
|
7
|
+
#: to end users wherever the import happens, not only in ``__main__``.
|
|
8
|
+
DEPRECATION_MESSAGE = (
|
|
9
|
+
"opencomputer-sdk is deprecated and receives no further releases: the "
|
|
10
|
+
"OpenComputer sandbox platform it targets is shut down. For Serverless "
|
|
11
|
+
"Agents use the management API (https://opencomputer.dev/agents/api) or "
|
|
12
|
+
"the TypeScript client @opencomputer/sdk/agents (npm install @opencomputer/sdk)."
|
|
13
|
+
)
|
|
14
|
+
_warnings.warn(DEPRECATION_MESSAGE, FutureWarning, stacklevel=2)
|
|
2
15
|
|
|
3
16
|
from opencomputer.sandbox import Sandbox, ScalingLockedError, PlanLimitError, SandboxFamilyLimitError
|
|
4
17
|
from opencomputer.browser import Browser, BrowserProfile
|
|
@@ -26,7 +26,7 @@ this docstring start with that name: two readers of this file are greps.
|
|
|
26
26
|
|
|
27
27
|
from __future__ import annotations
|
|
28
28
|
|
|
29
|
-
__version__ = "1.
|
|
29
|
+
__version__ = "1.2.0"
|
|
30
30
|
|
|
31
31
|
#: Header carrying the version above. Lower-case to match the TypeScript SDK;
|
|
32
32
|
#: HTTP/2 requires it there and consistency costs nothing here.
|
|
@@ -8,7 +8,7 @@ name = "opencomputer-sdk"
|
|
|
8
8
|
# server in x-oc-sdk-version. One source, so the published version and the
|
|
9
9
|
# routed-on version cannot disagree.
|
|
10
10
|
dynamic = ["version"]
|
|
11
|
-
description = "Python SDK for
|
|
11
|
+
description = "Deprecated: Python SDK for the retired OpenComputer sandbox platform. 1.2.0 is the final release."
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.10"
|
|
14
14
|
license = "MIT"
|
|
@@ -17,7 +17,7 @@ authors = [
|
|
|
17
17
|
]
|
|
18
18
|
keywords = ["sandbox", "opencomputer", "cloud", "containers", "code-execution"]
|
|
19
19
|
classifiers = [
|
|
20
|
-
"Development Status ::
|
|
20
|
+
"Development Status :: 7 - Inactive",
|
|
21
21
|
"Intended Audience :: Developers",
|
|
22
22
|
"License :: OSI Approved :: MIT License",
|
|
23
23
|
"Programming Language :: Python :: 3",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
import sys
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _fresh_import():
|
|
9
|
+
for name in [m for m in sys.modules if m == "opencomputer" or m.startswith("opencomputer.")]:
|
|
10
|
+
del sys.modules[name]
|
|
11
|
+
return importlib.import_module("opencomputer")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_import_warns_deprecated_and_points_to_replacement():
|
|
15
|
+
with pytest.warns(FutureWarning, match="deprecated") as record:
|
|
16
|
+
mod = _fresh_import()
|
|
17
|
+
message = str(record[0].message)
|
|
18
|
+
assert "@opencomputer/sdk/agents" in message
|
|
19
|
+
assert "https://opencomputer.dev/agents/api" in message
|
|
20
|
+
assert mod.DEPRECATION_MESSAGE == message
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_final_release_version_stays_on_major_1():
|
|
24
|
+
# The server routes on the SDK's major (x-oc-sdk-version); the deprecation
|
|
25
|
+
# release must not move callers.
|
|
26
|
+
with warnings.catch_warnings():
|
|
27
|
+
warnings.simplefilter("ignore", FutureWarning)
|
|
28
|
+
mod = _fresh_import()
|
|
29
|
+
assert mod.__version__ == "1.2.0"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def test_existing_exports_still_import():
|
|
33
|
+
with warnings.catch_warnings():
|
|
34
|
+
warnings.simplefilter("ignore", FutureWarning)
|
|
35
|
+
mod = _fresh_import()
|
|
36
|
+
for name in mod.__all__:
|
|
37
|
+
assert hasattr(mod, name), name
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|