Speakeasy Logo
Skip to Content

Poetry 2.0 and Python 3.9 updates

This guide covers important updates to the Python SDK generation process related to Poetry 2.0 and Python 3.9 requirements.

Changes overview

To evolve with the Python ecosystem and maintain compatibility with current tooling, the Python SDK generation process implements two significant changes:

  1. The minimum Python version for generated Python SDKs changes from 3.8 to 3.9.
  2. Poetry packaging tool updates to version 2.0.0.

Python 3.9 requirement

Python 3.8 reached end-of-life (EOL) status in October 2024 and the Python language maintainers no longer support it for security and bug fixes. The last bug fix update occurred in May 2021, and the last security update occurred in September 2024.

The key type safety tools used in the Speakeasy generation process have begun removing Python 3.8 support:

Poetry 2.0 update

The Poetry version 2.0.0 release introduces breaking changes to CLI commands used in the generation process, affecting compatibility with version 1.x. By default, Poetry is installed at the latest version when following the documented installation options.

Local development updates

API producers running generation locally need to update Poetry to the new major version. The update process depends on the installation method:

If Poetry is not updated, the generator will output a dependency version error:

GitHub Actions configuration

API producers using GitHub Actions (speakeasy-api/sdk-generation-action@v15) with the latest Speakeasy version will have Poetry automatically updated. No changes are needed for the most common usage.

If the Speakeasy version is pinned to an older version, add the poetry_version input to the repository’s workflow configuration to pin Poetry to the older major version:

Version update considerations

Consistent with industry practice, the Speakeasy generator will suggest a minor version update for the generated SDK to reflect these Python changes. However, consider releasing the SDK as a major version update if API consumers are likely to be using Python 3.8, which was previously common for some data management SaaS platforms.

For questions, reach out on Slack .

Last updated on