Skip to content

dill and pycodify are installed for every user but imported only by history files and codegen #43

Open

Description

@trissim

What happens (pyproject.toml:26-30 at 1fcdf12): installing objectstate installs dill and pycodify. dill is imported only inside two functions of object_state_registry.py (lines 2345 and 2358, saving and loading history files); pycodify only by codegen.py, which #38 reports as used only by its own tests. import objectstate and editing a state load neither.

Wanted: a program that only holds and edits state installs neither: move them to extras (history files, code generation) or delete with #38.

Workaround in Toad now: [[tool.uv.dependency-metadata]] restates objectstate's requirements as python-introspect only.

Acceptance: fresh environment, pip install objectstate, then creating an ObjectState, update_parameter, mark_saved, restore_saved all work and pip list shows no dill or pycodify.

Activity

  1. trissim commented on Oct 16, 2026

    @trissim
    ContributorAuthor

    ObjectStateRegistry.save_history_to_file and load_history_from_file import dill locally (src/objectstate/object_state_registry.py:2357–2390 in the inspected OpenHCS dependency checkout, ObjectState 01f3a5d). OpenHCS uses both methods in openhcs/desktop/update.py:492,616, so deleting the history support would break real persistence.

    Keep this issue open: move dill out of mandatory dependencies into an optional history-files extra, retaining the existing history format and methods. Basic state editing should not require it. OpenHCS already declares dill directly in its dependencies. No code changes or tests were performed for this finding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions