Skip to content

ci: test the SDK on Python 3.12 as well as 3.10 - #193

Merged
chris-freeman-glean merged 1 commit into
mainfrom
cfreeman/python-3-12-test-matrix-4588
Nov 11, 2026
Merged

chris-freeman-glean merged 1 commit into
mainfrom
cfreeman/python-3-12-test-matrix-4588

Conversation

@chris-freeman-glean

Copy link
Copy Markdown
Contributor

The enum discriminator bug only fails on Python 3.11 and newer. Test was running 3.10, the version pinned in mise.toml, so a regression of the 0.17.20 fix would stay green.

Test now runs the same suite on 3.10 and 3.12. MISE_PYTHON_VERSION overrides the mise pin per job, and the tool cache key includes that version. Local development stays on 3.10. Generated files are unchanged.

Test plan

  • Python 3.12.3: pytest tests/test_chat_sdk.py::test_chat_sdk_platform_chat_create passed on this branch (the fixed to_discriminator).
  • With to_discriminator reverted to the pre-0.17.20 body locally and not committed, the same command failed. Pydantic rejected tag PlatformChatJSONSchemaFormatType.JSON_SCHEMA (expected JSON_SCHEMA).
  • CI should show Test (Python 3.10) and Test (Python 3.12) green.

Risk and revert

Workflow only. Reverting this commit returns CI to the 3.10-only run. No package or API change.

Open in Web Open in Cursor 

The discriminator enum bug only shows on Python 3.11+, and the Test
workflow was only exercising the mise.toml pin of 3.10.

Co-authored-by: Chris Freeman <chris-freeman-glean@users.noreply.github.com>

@steve-calvert-glean steve-calvert-glean left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The matrix runs 3.10 and 3.12, the version check fails fast if mise picks the wrong interpreter, and both jobs pass.

@chris-freeman-glean
chris-freeman-glean merged commit 3b0e48b into main Nov 11, 2026
3 checks passed
@chris-freeman-glean
chris-freeman-glean deleted the cfreeman/python-3-12-test-matrix-4588 branch November 11, 2026 23:54
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.

3 participants