Skip to content

chore(deps): bump mloda to 0.10.0#83

Merged
TomKaltofen merged 2 commits into
mainfrom
chore/bump-mloda-0.10.0
Jul 13, 2026
Merged

chore(deps): bump mloda to 0.10.0#83
TomKaltofen merged 2 commits into
mainfrom
chore/bump-mloda-0.10.0

Conversation

@TKaltofen

Copy link
Copy Markdown
Collaborator

What

Raises the mloda floor from 0.9.0 to 0.10.0 and refreshes uv.lock.

Improvements surfaced by the bump

Fixed a shared-UUID bug in the example ComputeFramework. MyComputeFramework.__init__ declared uuid: UUID = uuid4(). Python evaluates a default once at import, so every instance constructed without an explicit uuid shared a single id:

MyComputeFramework().uuid == MyComputeFramework().uuid  # True, before this PR

mloda keys compute-framework instances by uuid (cfw_collection[cfw_uuid], worker_manager.process_register, track_data_to_drop), so colliding ids silently overwrite each other. The engine itself always passes an explicit uuid, so nothing in mloda regresses, but every plugin generated from this template inherited the footgun for any direct instantiation. Now defaults to None and mints a fresh uuid per instance. Two tests pin it, and both fail against the old default.

Adopted isolated_plugin_registry. mloda 0.10 ships this fixture as a pytest plugin (auto-registered, no conftest wiring). test_plugin_loader_discovers_example_classes called PluginLoader.all(force_reload=True) and mutated the process-global registry with no teardown, leaking into every test that ran after it.

Housekeeping: dropped the last typing.Set from the example extender, and removed the stale mloda 0.9 version strings from the pyproject comment and README so they cannot drift from the declared floor.

Migration: none needed

0.10.0's breaking changes (PROPERTY_MAPPING flattened form removed, input-feature option forwarding now default, allow_empty_result retired, HashableDict rejected as a credential value, chained extender failures breaking by default) do not touch the template's surface. The placeholder FeatureGroup defines only calculate_feature, and MyExtender.wraps() returns an empty set, so it is never invoked.

Considered and deliberately skipped as scope creep for a minimal template: property_spec, validate_native_data, and the new Extender introspection helpers. Each would mean inventing an options or data surface the scaffold intentionally omits.

Follow-up for mloda core

The same uuid: UUID = uuid4() default exists upstream on ComputeFramework.__init__ itself, so a plugin author who subclasses without writing an __init__ still inherits the shared default. compute_framework.py also has a dead if self.uuid is None: raise guard, suggesting the base was meant to accept UUID | None. Worth a separate issue.

Verification

tox green (19 passed, ruff format, ruff check, mypy --strict, bandit) and tox -e security (pip-audit) clean. Reviewed by an independent Claude Opus agent and by codex review.

Raise the mloda floor from 0.9.0 to 0.10.0 and refresh the lock.

Improvements surfaced by the bump:

- MyComputeFramework used `uuid: UUID = uuid4()` as a default. Python
  evaluates a default once at import, so every instance shared a single
  uuid. mloda keys compute-framework instances by uuid, so any plugin
  generated from this template inherited the collision. Default to None
  and mint a fresh uuid per instance instead.
- Modernize the signature to `X | None` per the repo type-hint rule.
- Bump the stale mloda version example in the issue template.

0.10.0 needs no migration here: the breaking changes (PROPERTY_MAPPING
flattened form, input-feature option forwarding, allow_empty_result) do
not touch the template's surface. Full tox gate and pip-audit are green.
Adopt the isolated_plugin_registry fixture that mloda 0.10 ships as a
pytest plugin (auto-registered, no conftest wiring). The entry-point test
called PluginLoader.all(force_reload=True) and mutated the process-global
registry with no teardown, leaking into every later test.

Also drop the last typing.Set from the example extender, and remove the
now-stale "mloda 0.9" version strings from the pyproject comment and
README so they cannot drift from the declared floor.
@TomKaltofen
TomKaltofen merged commit 7a0523a into main Jul 13, 2026
5 checks passed
@TomKaltofen
TomKaltofen deleted the chore/bump-mloda-0.10.0 branch July 13, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants