[codex] Stage Python SDK beta versions from release tags (#24872)

## Summary
- Treat `sdk/python` as a development template with source version
`0.0.0-dev`, matching the existing Python runtime packaging pattern.
- Have `python-v*` tags supply the published SDK beta version through
the existing `stage-sdk --sdk-version` path.
- Remove the workflow check requiring a source version bump for each
beta release and remove its now-unused host Python setup step.
- Keep the reviewed runtime dependency pin at
`openai-codex-cli-bin==0.132.0`.
- Remove beta-number-specific documentation so it does not need editing
for each publish.

## Why
The package staging script already writes the release version into the
artifact. Requiring the checked-in SDK template version to match every
tag adds release-only source churn without changing the package users
receive.

## Validation
- Not run locally; relying on online CI for this workflow and metadata
change.

## Release
After this PR lands, publish the next beta by pushing tag
`python-v0.1.0b2` from merged `main`.
This commit is contained in:
Ahmed Ibrahim
2026-05-27 23:24:42 -07:00
committed by GitHub
Unverified
parent 3d9f58ace8
commit 46946bb91c
6 changed files with 9 additions and 29 deletions
-13
View File
@@ -23,11 +23,6 @@ jobs:
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Validate tag and build Python SDK package
shell: bash
run: |
@@ -39,14 +34,6 @@ jobs:
exit 1
fi
configured_version="$(
python -c 'import tomllib; print(tomllib.load(open("sdk/python/pyproject.toml", "rb"))["project"]["version"])'
)"
if [[ "${configured_version}" != "${sdk_version}" ]]; then
echo "Tag version ${sdk_version} does not match sdk/python/pyproject.toml version ${configured_version}."
exit 1
fi
# The pinned runtime currently publishes a musllinux Linux wheel.
# Build in Alpine so release type generation installs that wheel.
docker run --rm \
+1 -2
View File
@@ -10,8 +10,7 @@ After a stable release exists, pass `--pre` to opt into newer prereleases.
## Why does the SDK install a runtime package?
The SDK and runtime packages are versioned independently. Each SDK release
pins one compatible runtime dependency, so `openai-codex==0.1.0b1` installs
`openai-codex-cli-bin==0.132.0` automatically.
pins and installs one compatible runtime dependency automatically.
## Thread vs turn
-6
View File
@@ -11,12 +11,6 @@ Install the SDK:
pip install openai-codex
```
For a reproducible install of this release:
```bash
pip install openai-codex==0.1.0b1
```
Requirements:
- Python `>=3.10`
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "openai-codex"
version = "0.1.0b1"
version = "0.0.0-dev"
description = "Python SDK for Codex"
readme = "README.md"
requires-python = ">=3.10"
@@ -239,17 +239,17 @@ def test_runtime_distribution_name_is_consistent() -> None:
)
def test_source_sdk_package_pins_published_runtime() -> None:
"""The source package metadata should pin the runtime wheel that ships schemas."""
def test_source_sdk_template_pins_published_runtime() -> None:
"""The source template should carry a development version and reviewed runtime pin."""
script = _load_update_script_module()
pyproject = tomllib.loads((ROOT / "pyproject.toml").read_text())
assert {
"sdk_version": pyproject["project"]["version"],
"sdk_template_version": pyproject["project"]["version"],
"runtime_pin": script.pinned_runtime_version(),
"dependencies": pyproject["project"]["dependencies"],
} == {
"sdk_version": "0.1.0b1",
"sdk_template_version": "0.0.0-dev",
"runtime_pin": "0.132.0",
"dependencies": [
"pydantic>=2.12",
@@ -319,7 +319,7 @@ def test_runtime_setup_reads_independent_runtime_pin_and_release_tags() -> None:
assert {
"package_name": runtime_setup.PACKAGE_NAME,
"sdk_version": pyproject["project"]["version"],
"sdk_template_version": pyproject["project"]["version"],
"runtime_pin": runtime_setup.pinned_runtime_version(),
"normalized_release_version": runtime_setup._normalized_package_version(
"rust-v0.116.0-alpha.1"
@@ -327,7 +327,7 @@ def test_runtime_setup_reads_independent_runtime_pin_and_release_tags() -> None:
"release_tag": runtime_setup._release_tag("0.116.0a1"),
} == {
"package_name": "openai-codex-cli-bin",
"sdk_version": "0.1.0b1",
"sdk_template_version": "0.0.0-dev",
"runtime_pin": "0.132.0",
"normalized_release_version": "0.116.0a1",
"release_tag": "rust-v0.116.0-alpha.1",
+1 -1
View File
@@ -282,7 +282,7 @@ wheels = [
[[package]]
name = "openai-codex"
version = "0.1.0b1"
version = "0.0.0.dev0"
source = { editable = "." }
dependencies = [
{ name = "openai-codex-cli-bin" },