Skip to content

chore(python): deprecate the Python SDK in core - #5350

Open
pimlock wants to merge 4 commits into
mainfrom
chore/5287-stop-core-pypi-publish/pimlock
Open

pimlock wants to merge 4 commits into
mainfrom
chore/5287-stop-core-pypi-publish/pimlock

Conversation

@pimlock

@pimlock pimlock commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Deprecates the Python SDK in core. Core stops publishing the openshell Python package to PyPI and stops attaching the wheel to stable and prerelease GitHub Releases. The Python SDK releases from ai-openshell/sdk-python from now on, and its first release there is 0.1.8. PyPI never accepts the same version twice. If this isn't merged before core tags v0.1.8, core publishes 0.1.8 first and sdk-python can't. openshell 0.1.7 stays the last core-built wheel. A new branch check also freezes the SDK sources in core, as Go SDK Freeze does for sdk/go, so SDK changes go to sdk-python instead of being lost here.

Related Issue

Refs #5287. This brings two cutover steps forward so they land before v0.1.8: removing PyPI publishing (phase 5) and the freeze check (phase 3).

Changes

  • release-build.yml: remove the build-python-wheel job and the python_version output.

  • release-publish.yml:

    • Remove the wheel from the release assets, openshell-checksums-sha256.txt and the attestations.
    • Remove the publish-pypi job and its entry in Check Publication.
  • Delete wheel-publish.yml.

  • release.yml and release-prerelease.yml: stop passing python-version.

  • Python SDK Freeze (branch-checks.yml): fails PRs that add or change the files sdk-python imported.

    • Frozen: all of python/, plus tasks/scripts/generate_python_proto.py and tasks/scripts/verify-python-wheel.py. That is exactly the imported tree.
    • Still editable: the shared pyproject.toml and uv.lock.
    • Allowed: deletions. Merge queue runs skip the job, as they do for the Go job.
  • Core-only tests move out of python/, next to the code they test, so the freeze needs no exclusion list:

    • release_formula_test.py and release_tooling_test.py → tasks/scripts/
    • rpm_gateway_config_migration_test.py → deploy/rpm/migrate_gateway_config_test.py
    • gateway_config_fixture_test.py → e2e/configs/gateway/

    A new hidden test:python-scripts task runs them. It is part of mise run test and of the Python job in Branch Checks. Ruff and ty cover the two new directories.

  • AGENTS.md and CONTRIBUTING.md: mark the SDK as frozen and point to sdk-python.

  • CI.md and the release-openshell and release-captain skills: describe the new ownership, and drop the PyPI check from the release captain steps.

Not in this PR: the rolling dev release keeps its dev wheel, and PR checks still build and test the SDK. Both go when python/ leaves core.

After merge, an admin adds Python SDK Freeze to main's required checks.

Follow-ups outside this repository:

Release Notes

The openshell Python SDK is now published from ai-openshell/sdk-python instead of this repository, starting with 0.1.8. Install it the same way, with pip install openshell. Core GitHub Releases no longer attach the openshell wheel or its checksum. Install from PyPI instead of downloading the wheel from the release.

Testing

  • mise run pre-commit passes (the commit hook)
  • mise run test:python-scripts: the 28 moved tests pass.
  • Python SDK Freeze pathspecs checked locally. They list the same files as sdk-python's imported tree, flag an edit to python/openshell/sandbox.py, and ignore the test moves and edits to the moved tests.
  • actionlint on the changed workflows. The only findings are the existing concurrency.queue key, which actionlint doesn't know yet.
  • Unit tests added/updated (moved, not changed)
  • E2E tests added/updated (not applicable). The first real run is the next v0.1.8-pre.N prerelease.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

The Python SDK now releases from ai-openshell/sdk-python, and its first
release there is openshell 0.1.8. PyPI never accepts a version twice, so
core must not publish 0.1.8 when it tags v0.1.8. openshell 0.1.7 stays
the last core-built wheel.

Stable and prerelease releases no longer build the wheel, attach it to
the GitHub Release, include it in the checksums and attestations, or
publish it to PyPI. wheel-publish.yml and the publish-pypi job are
removed, along with the python-version plumbing that only fed them.

The rolling dev release keeps its wheel, and PR checks still build the
SDK, until the SDK sources leave core.

Refs #5287

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. python-sdk — No explicit risk acceptance found

Stable and prerelease GitHub Releases previously supplied an openshell wheel and checksum; the candidate removes both.

  • Impact: Consumers downloading SDK wheels with gh release download &lt;tag&gt; --pattern &#x27;*.whl&#x27; now find no matching asset, breaking installation and checksum-verification automation.
  • Action: Preserve the wheel asset and checksum on core releases for this patch train, attaching the externally produced SDK wheel if necessary.
  • PR: chore(python): deprecate the Python SDK in core #5350
Review details
  • Execution: complete
  • Candidate: PR #5350 (91a7837b46bbd893397abd4e178331ab6dc2239a)
  • Baseline: cb836ea9d78cade7502167b2569a952e5e715cdc (cb836ea9d78cade7502167b2569a952e5e715cdc)
  • Reviewed: rust-sdk, python-sdk, go-sdk, typescript-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

ai-openshell/sdk-python imported the Python SDK at v0.1.7, and nothing
under the moved paths has changed in core since. A Python SDK Freeze
job, like the Go SDK Freeze job, fails PRs that add or change those
files, so SDK changes go to sdk-python instead of being lost here.

The pathspecs match exactly the files the import moved: the package
under python/openshell, the SDK tests at the python/ root, and the proto
and wheel scripts. Core-only tests under python/ and the shared root
pyproject.toml and uv.lock stay editable. Deletions are allowed for the
removal PR.

Refs #5287

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@pimlock pimlock changed the title ci(release): stop building and publishing the Python wheel chore(python): deprecate the Python SDK in core Nov 6, 2026
The release, RPM migration, and E2E gateway fixture tests only test core
tooling. Move them next to the code they test and run them from a new
test:core-python task, so the Python SDK Freeze check can cover all of
python/ instead of listing the SDK files one by one.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Label test:e2e applied for 52295fe. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

This branch has not been deployed

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

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant