objectstate 3.0.0__tar.gz → 3.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {objectstate-3.0.0 → objectstate-3.0.1}/PKG-INFO +1 -1
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/__init__.py +1 -1
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/lazy_factory.py +16 -9
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/ui_visibility.py +8 -1
- {objectstate-3.0.0 → objectstate-3.0.1}/.github/badges/coverage.svg +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/.github/workflows/ci.yml +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/.github/workflows/coverage-pages.yml +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/.github/workflows/publish.yml +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/.gitignore +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/.readthedocs.yaml +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/BADGE_SETUP.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/LICENSE +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/README.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/.gitignore +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/Makefile +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/api/modules.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/architectural_fixes.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/architecture.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/archive/DOCUMENTATION_AUDIT.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/archive/DOCUMENTATION_FIXES.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/archive/README.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/conf.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/examples/atomic_operations.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/examples/basic.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/examples/dual_axis.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/examples/index.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/examples/ui.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/index.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/make.bat +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/performance/canonical-context-type-resolution-20261005.json +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/provenance.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/quickstart.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/state_management.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/state_propagation.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/docs/undo_redo.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/paper.bib +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/paper.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/plans/n_dimensional_inheritance.md +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/pyproject.toml +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/scripts/check_ruff_added_lines.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/scripts/release.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/scripts/update_and_release.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/scripts/update_version.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/scripts/verify_release_ready.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/codegen.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/collection_containers.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/config.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/construction_binding.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/context_manager.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/docs/configuration_framework.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/docs/context_system.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/docs/object_state_lifecycle.rst +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/dual_axis_resolver.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/edit_session.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/field_access.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/global_config.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/inspection.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/live_context_resolver.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/object_state.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/object_state_metadata.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/object_state_registry.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/parameter_owner.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/parameter_structure.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/parametric_axes.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/placeholder.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/reified_generics.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/scope_key.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/snapshot_model.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/subfield_semantics.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/time_travel_profile.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/token_cache.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/transaction_checkpoint.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/src/objectstate/value_semantics.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/__init__.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/conftest.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_atomic_block_context.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_authored_paths.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_callable_baseline.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_codegen.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_config.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_construction_history.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_context_failures_surface.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_context_manager.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_field_access.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_global_config.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_history_persistence.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_inspection.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_integration.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_lazy_counterpart_registry.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_lazy_factory.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_live_context_resolver_answers.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_object_state_metadata_contracts.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_object_state_restore.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_object_state_update_instance.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_one_field_resolution.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_parameter_owner.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_parametric_axes.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_placeholder.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_registry_subscription.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_reified_generics.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_release_readiness.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_resolved_change_notifications.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_scope_key.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_scopeless_state_resolution.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_subfield_semantics.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_timeline_projection.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_transaction_checkpoint.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_ui_visible_field_projection.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_undo_redo_cascade.py +0 -0
- {objectstate-3.0.0 → objectstate-3.0.1}/tests/test_value_semantics.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: objectstate
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: Generic lazy dataclass configuration framework with dual-axis inheritance and contextvars-based resolution
|
|
5
5
|
Project-URL: Homepage, https://github.com/OpenHCSDev/objectstate
|
|
6
6
|
Project-URL: Documentation, https://objectstate.readthedocs.io
|
|
@@ -46,9 +46,17 @@ def _recreated_dataclass_namespace(
|
|
|
46
46
|
declared_type: type,
|
|
47
47
|
recreated_name: str,
|
|
48
48
|
) -> dict[str, object]:
|
|
49
|
-
"""Return declaration-owned metadata for a recreated dataclass.
|
|
49
|
+
"""Return declaration-owned metadata for a recreated dataclass.
|
|
50
50
|
|
|
51
|
-
namespace
|
|
51
|
+
The module and qualified name are in the namespace so the class has them
|
|
52
|
+
while it is being created: a metaclass that registers classes then sees the
|
|
53
|
+
declaration the class was rebuilt from, not ``abc`` or this module.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
namespace: dict[str, object] = {
|
|
57
|
+
"__doc__": declared_type.__doc__,
|
|
58
|
+
"__module__": declared_type.__module__,
|
|
59
|
+
}
|
|
52
60
|
if recreated_name == declared_type.__name__:
|
|
53
61
|
namespace["__qualname__"] = declared_type.__qualname__
|
|
54
62
|
return namespace
|
|
@@ -203,16 +211,15 @@ def rebuild_with_none_defaults(
|
|
|
203
211
|
frozen=is_frozen,
|
|
204
212
|
)
|
|
205
213
|
|
|
206
|
-
#
|
|
207
|
-
#
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
# But we must NOT re-apply @dataclass since make_dataclass already did that
|
|
214
|
+
# make_dataclass takes no metaclass parameter: it derives one from the
|
|
215
|
+
# bases. When the declared class names a metaclass its bases do not carry,
|
|
216
|
+
# create the class once more with that metaclass. @dataclass is NOT
|
|
217
|
+
# re-applied, since make_dataclass already did that.
|
|
218
|
+
if type(new_cls) is not orig_metaclass:
|
|
212
219
|
new_cls = orig_metaclass(
|
|
213
220
|
new_cls.__name__,
|
|
214
221
|
new_cls.__bases__,
|
|
215
|
-
|
|
222
|
+
{**new_cls.__dict__, **_recreated_dataclass_namespace(cls, recreated_name)},
|
|
216
223
|
)
|
|
217
224
|
|
|
218
225
|
return _restore_recreated_dataclass_metadata(new_cls, cls)
|
|
@@ -40,7 +40,14 @@ class UISpecialFieldRegistry:
|
|
|
40
40
|
def register(cls, owner_type: T, field_names: tuple[str, ...]) -> T:
|
|
41
41
|
if not field_names:
|
|
42
42
|
raise ValueError("UI special field registration requires at least one field")
|
|
43
|
-
|
|
43
|
+
declared = frozenset(field_names)
|
|
44
|
+
registered = cls._fields_by_owner.get(owner_type)
|
|
45
|
+
if registered is not None and registered != declared:
|
|
46
|
+
raise ValueError(
|
|
47
|
+
f"{owner_type.__qualname__} already declares UI special fields "
|
|
48
|
+
f"{sorted(registered)!r}; it cannot also declare {sorted(declared)!r}."
|
|
49
|
+
)
|
|
50
|
+
cls._fields_by_owner[owner_type] = declared
|
|
44
51
|
return owner_type
|
|
45
52
|
|
|
46
53
|
@classmethod
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|