Releases: AGitUser0001/pysandbox
Release list
v1.5.4
pysandbox-wasi v1.5.4
Added
- Added
Worker.call_function()for executing dynamic asynchronous function bodies against a worker's persistent globals. - Function bodies support statements,
await, andreturn. - Values are passed as explicit keyword-only arguments through the existing CBOR transport.
- Per-call fuel operations are supported through the positional
fuelargument.
result = await worker.call_function(
"""
await asyncio.sleep(1)
return add(add(a, b), add(c, d))
""",
AddFuel(500_000, cap=2_000_000),
a=1,
b=2,
c=3,
d=4,
)The source is parsed directly into an AST without indentation rewriting. The generated callable uses the worker's persistent __main__ namespace but is never inserted into its globals.
Changed
- Public
Worker.call()now rejects empty call paths. Empty paths are reserved internally forcall_function().
Full Changelog: v1.5.3...v1.5.4
v1.5.3
pysandbox-wasi v1.5.3
Added
- Run the interactive tutorial with
python -m pysandbox.demo. - Added
package_indextoPythonRuntimefor custom package index implementations. - Exported
PyPIIndex,DEFAULT_PACKAGE_CACHE, andDEFAULT_PACKAGE_INDEX.
Changed
- Package cache and index defaults are now shared, explicit singletons.
- Package cache discovery no longer prevents importing pysandbox in restricted or incompletely configured environments.
- Passing
package_cache=Noneis supported; package resolution then raises a clearPackageErrorwhen used.
Full Changelog: v1.5.2...v1.5.3
v1.5.2
pysandbox-wasi 1.5.2
Fixed
- Restore Wasmtime compilation caching across sandbox processes, substantially reducing repeated startup time.
- Correctly handle guest
SystemExit,KeyboardInterrupt, and other fatal exceptions without crashing the component runtime. - Preserve structured exit codes for normal guest termination.
Added
- Add
PythonRuntime(compilation_cache=...)for enabling, disabling, or relocating the Wasmtime compilation cache.
Full Changelog: v1.5.1...v1.5.2
v1.5.1
pysandbox-wasi 1.5.1
Performance
- Replaced full-cache path scans with a component-indexed VFS cache.
- Directory invalidation now detaches only the affected cached subtree.
- Directory rename now moves cached subtrees structurally without re-keying every descendant.
- Unrelated VFS cache entries remain untouched during invalidation and rename.
This release contains no public API changes.
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Writable virtual filesystems
This release expands the host-backed virtual filesystem with guest write support.
Added
- File creation and offset writes
- Appending and truncation
- File and directory deletion
- Directory creation
- File and directory renaming
- Read and write permissions in VFS metadata
- Cache invalidation after filesystem mutations
- Correct guest filesystem errors, including non-empty directory errors
Optional operations have native fallbacks where possible:
appendfalls back to an offset write.truncatefalls back to reading and rewriting the file.- File rename falls back to copy and delete.
Directory renaming still requires an explicit implementation.
Breaking changes
VirtualFileSystem is now an abstract base class.
Implementations must subclass it and provide:
stat()read()list()
Writable implementations may additionally provide write(), delete(),
mkdir(), append(), truncate(), and rename(). Unsupported optional
operations raise NotImplementedError.
Project updates
- Added comprehensive internal and contributor documentation.
- Migrated tests to pytest with parallel execution.
- Improved free-threaded Python testing and wheel builds.
- Reduced CI build and test latency.
Full Changelog: v1.4.0...v1.5.0
v1.4.0
Initial public release of pysandbox-wasi.
See the README for installation, API documentation, and architecture details.