Skip to content

Hayward 1.4.0

Choose a tag to compare

@hedgerow-dev hedgerow-dev released this 22 Oct 15:12
d3e8bf6

Adds the load guard. import hayward.guard guards pickle.load, joblib.load, numpy.load(allow_pickle=True) and torch.load: each file is scanned first, and while the loader runs every global it resolves is checked before import. Other unpickling in the process, such as pickle.loads and multiprocessing, is untouched.

The default mode raises the bar and is not a sandbox. install(strict=True) refuses every global not on the known-safe list and is the setting for untrusted files. The usage guide lists what the guard does not cover.

Also: standard-library value types (datetime, decimal, uuid, fractions, pathlib) join the known-safe list, and transformers is trusted by exact name only.

Full details in the CHANGELOG. All 15 CI checks passed on Python 3.10 to 3.13 across Linux, macOS and Windows.