Skip to content

refactor!: remove the Python extension crate, now maintained in finos/morphir-python - #314

Merged
DamianReeves merged 2 commits into
mainfrom
DamianReeves/remove-python-binding
Oct 28, 2026
Merged

DamianReeves merged 2 commits into
mainfrom
DamianReeves/remove-python-binding

Conversation

@DamianReeves

Copy link
Copy Markdown
Member

Summary

This PR removes crates/morphir-python-binding from this workspace. The crate moved to finos/morphir-python, which now maintains and releases it (finos/morphir-python#41; OpenSpec change migrate-python-binding, bead morphir-ukvn.1.6.7).

  • It removes the crate, its workspace membership, the four Ruff workspace dependencies only it used, and their lockfile entries. The lockfile update removes packages only; no other version changes.
  • It removes the [extensions.python] registry entry, the extension:artifact:python task, the Python case of test:cli-release, and the CI step that ran generated Python.
  • It deletes crates/morphir-host-native/tests/python_extension.rs. That file read fixtures from the deleted directory. The remaining Rust, Gleam and Elm-native guests already cover every host behavior it checked: packaged install and activation, v3/v4 compile/generate, recompile, and Extism calls (see the commit body). The Python-specific lifecycle check now runs in finos/morphir-python, through an offline Morphir CLI host.
  • The CI classifier and release tests keep their coverage; they use a remaining extension as the sample. test_python_extension_release.py becomes test_frontend_extension_release.py and keeps the two checks that had no other coverage.
  • The Python tutorial becomes a pointer page. The README, extension tutorial and the generated llms files are updated, and CHANGELOG has a Breaking entry.

The historical extension/python/v0.1.0–v0.4.0 releases stay published.

Verification

  • cargo metadata --locked, cargo build --locked --workspace, cargo fmt --all --check.
  • cargo test --locked -p morphir-distribution: 288 passed.
  • cargo test --locked -p morphir-host-native: 0 failures.
  • clippy -D warnings on the touched crates.
  • python -m unittest discover -s tests/ci: 272 run, with 1 error, test_provider_child_environment_is_explicit_and_drops_inherited_values. It fails in the same way on clean 0aa60eb (a local pwsh mise shim has no version), so this PR does not cause it.
  • git grep for the crate name, the artifact task and MORPHIR_PYTHON finds only historical changelog lines and the new pointer text.

Merge order

Merge this PR after the first finos/morphir-python bundle is published and finos/morphir pins it. Until then, the existing morphir-rust releases remain the published provider. Merging needs maintainer approval.

The Python extension (crate morphir-python-binding 0.4.0, bundle
morphir-python, short id python) now lives in finos/morphir-python at
rust/crates/morphir-python-binding, with its tests, fixtures, examples and
Gherkin acceptance. This workspace no longer builds, tests or releases it.
The extension/python/v0.1.0 to v0.4.0 releases stay published here.

Removed:
- the crate, its default-members entry, the Ruff workspace dependencies and
  the lockfile entries only it used (cargo update --workspace --offline; no
  other package version changed);
- [extensions.python] in .github/extensions.toml, the
  extension:artifact:python task, the python case of test:cli-release and
  the CI step for generated Python functions.

Host tests: crates/morphir-host-native/tests/python_extension.rs is
deleted. Both of its tests were ignored and read fixtures from the deleted
crate. The packaged test checked publish to a local repository, version-2
claims with frontend and backend, Unchecked claim checks before and after
install, install from LocalIndex, activation from Morphir Home after the
repository is removed, MEP negotiation of frontend languages and backend
targets, and compile, generate and close in IR v3 and v4. The same host
path is covered for remaining guests by rust_extension.rs, gleam_extension.rs
and elm_native_extension.rs, which their extension:artifact tasks run in
the CI extension-bundle job. gleam_extension.rs also compiles, generates and
compiles again in both IR versions. Direct Extism container calls
(initialize, capabilities, generate, lifecycle order) stay covered by
extism_extension.rs. No host behavior loses its only coverage. Python
compile and generate lifecycle checks move to finos/morphir-python, which
runs them with the morphir CLI as an offline MEP host. No support code was
used only by this file.

CI tests: the classifier, graph, output, change-detection, consistency,
routing, packaging and Windows identity tests now use morphir-rust-binding,
rust or openapi as their sample, so they test the same behavior. The
test_python_extension_release.py checks that are not covered elsewhere
(selection keeps frontend languages and refuses a descriptor without them;
packaging accepts frontend-only entries and refuses invalid languages) move
to test_frontend_extension_release.py with a Rust sample. Its tag routing
and CI bundle checks were duplicates of test_extension_release_routing.py
and test_ci_workflow_definition.py and are removed.

README drops the two Python rows and points to finos/morphir-python.
BREAKING CHANGE: build morphir-python-binding from finos/morphir-python.

Refs: morphir-ukvn.1.6.7 (OpenSpec migrate-python-binding task 7.1)
The tutorial page stays at its URL as a short pointer: the extension is now maintained and released from finos/morphir-python, and the historical extension/python/v0.1.0 to v0.4.0 bundles remain in morphir-rust releases. The extension tutorial now names the Rust binding as its frontend and backend example. docs/llms.txt and docs/llms-full.txt are regenerated with the docs:llms-txt generator.

Refs: morphir-ukvn.1.6.7
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T23:34:13.230922Z a731a49 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DamianReeves
DamianReeves merged commit 26d5e70 into main Oct 28, 2026
27 checks passed
@DamianReeves
DamianReeves deleted the DamianReeves/remove-python-binding branch October 28, 2026 03:56
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.

1 participant