Skip to content

Releases: AGitUser0001/pysandbox

v1.5.4

Choose a tag to compare

@github-actions github-actions released this 03 Aug 02:51
030cf6f

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, and return.
  • Values are passed as explicit keyword-only arguments through the existing CBOR transport.
  • Per-call fuel operations are supported through the positional fuel argument.
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 for call_function().

Full Changelog: v1.5.3...v1.5.4

v1.5.3

Choose a tag to compare

@github-actions github-actions released this 03 Aug 02:37
73df94a

pysandbox-wasi v1.5.3

Added

  • Run the interactive tutorial with python -m pysandbox.demo.
  • Added package_index to PythonRuntime for custom package index implementations.
  • Exported PyPIIndex, DEFAULT_PACKAGE_CACHE, and DEFAULT_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=None is supported; package resolution then raises a clear PackageError when used.

Full Changelog: v1.5.2...v1.5.3

v1.5.2

Choose a tag to compare

@github-actions github-actions released this 02 Aug 23:09
a55556e

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

Choose a tag to compare

@AGitUser0001 AGitUser0001 released this 02 Aug 07:03
7802a56

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

Choose a tag to compare

@AGitUser0001 AGitUser0001 released this 02 Aug 05:31
a86d401

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:

  • append falls back to an offset write.
  • truncate falls 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

Choose a tag to compare

@AGitUser0001 AGitUser0001 released this 01 Aug 18:37
7f6dd40

Initial public release of pysandbox-wasi.

See the README for installation, API documentation, and architecture details.