Repository navigation
Raise the pydantic floor so SDK generation installs on Python 3.14 - #186
Merged
Merged
Conversation
Speakeasy's compile image now runs Python 3.14, and poetry.lock still pins pydantic 2.11.3 / pydantic-core 2.33.1. That core release has no cp314 wheels, and PyO3 0.24.0 refuses to build it. Override the generator's default dependency so regeneration keeps pydantic >=2.12.0, and relock to a release that publishes 3.10 and 3.14 wheels. Co-authored-by: Chris Freeman <chris-freeman-glean@users.noreply.github.com>
travis-hoover-glean
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
Since 6 Nov 2026 12:43 PM MT, the floating
speakeasy-api/sdk-generation-action@v15image compiles on Python 3.14.poetry installstill installs lockedpydantic-core2.33.1. That release has no cp314 wheel, and its PyO3 0.24.0 refuses to build on 3.14. Compile SDK fails and the action deletes the regen branch. That closed PR 185 and later regen runs, including https://github.com/gleanwork/api-client-python/actions/runs/42282076104.Change
The Python generator hardcodes
pydantic >=2.11.2and rewritespyproject.tomlon every run.python.additionalDependencies.main.pydanticreplaces that default, so regeneration keeps the new floor. The floor is>=2.12.0: pydantic 2.12.0 is the first release that depends on a core build with cp314 wheels (pydantic-core==2.41.1). cp314 wheels, including musllinux x86_64, start at pydantic-core 2.35.0. No 2.11 release moves off pydantic-core 2.33.x.requires-pythonstays>=3.10.poetry.locknow resolves pydantic 2.14.3 and pydantic-core 2.50.4. Poetry 2.2.1poetry lockkeeps an already-valid pin, which is why the old 2.11.3 pin survived regeneration. The raised floor makes that pin invalid.Validation
poetry installused the cp310 manylinux wheel.poetry build, pytest (191 passed, 63 skipped), mypy, pyright, and pylint passed.poetry installused the cp314 manylinux wheel (not a source build).poetry build, mypy, pyright, and pylint passed. pytest: 190 passed, 63 skipped, 1 failed.test_chat_sdk_platform_chat_createfails because generatedget_discriminatorformats astrEnum with an f-string. On 3.14 that tag isPlatformChatJSONSchemaFormatType.JSON_SCHEMAinstead ofJSON_SCHEMA. The same test passed on 3.10. The current generator template still contains that f-string, so a patch in the generated file would be overwritten. Compile SDK does not run pytest.Risk and revert
Consumers pinned to pydantic 2.11 will need pydantic >=2.12 when they upgrade this package. A plain revert restores the previous floor and brings the Compile SDK failure back. No API types or migrations change in this PR.