Repository navigation
Own the JSON encoder, module public surfaces and lazy exports (L2) - #16
Merged
Merged
Conversation
to_jsonable becomes the encoder paired with dataclass_from_mapping, moved
from OpenHCS with its JsonValue/JsonObject/JsonScalar aliases. The module
public-surface helpers (declared_public_names and friends) move from
OpenHCS core.public_api. lazy_exports(globals(), {owner: names}) installs
the PEP 562 __getattr__/__dir__ pair that first-party packages copied
verbatim, and returns the exported names for __all__.
Version 0.2.2: additive, within the <0.3 bound ObjectState pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The path assertions now compare against str(PurePath(...)), which matches the encoder's str(path) on Windows. The changelog records that 0.2.2 is the first 0.2.x on PyPI (the 0.2.0/0.2.1 publishes were cancelled). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenHCS consolidation surface L2: python-introspect becomes the one dataclass codec and module-surface helper.
to_jsonable(singledispatch encoder: dataclasses by declared fields, mappings, sequences, enums, paths, callables by import identity,AutoRegisterMetatypes by registry key) and theJsonValue/JsonObject/JsonScalaraliases move here fromopenhcs.serialization.json, beside the existingdataclass_from_mappingdecoder.declared_public_names,exported_public_names,public_names_from_objects,is_declared_public_namemove here fromopenhcs.core.public_api.lazy_exports(globals(), {owner_module: names})installs the PEP 562__getattr__/__dir__pair (resolve once, cache in globals, reject a name declared by two owners) and returns the names for__all__. It replaces the verbatim copies in OpenHCS; arraybridge, PolyStore, zmqruntime and pyqt-reactive carry the same copy and can adopt it.<0.3bound).Lockstep OpenHCS PR follows (deletes the local copies, migrates importers, bumps the submodule and pin). Do not merge before review.
🤖 Generated with Claude Code