Python 3.15.0 Now Available in GitHub Actions
GitHub Actions now supports Python 3.15.0, allowing developers to test and deploy applications using the latest Python release with new features and
This configuration snippet enables Python 3.15.0 testing in GitHub Actions workflows. The actions/python-versions repository now includes support for the newly released Python 3.15.0, allowing developers to test their code against this version in continuous integration pipelines.
Use Cases
The primary use case for this update is adding Python 3.15.0 to testing matrices in GitHub Actions workflows. Developers maintaining Python libraries or applications can now verify compatibility with the latest Python release as part of their automated testing process.
Testing matrices allow projects to run the same test suite across multiple Python versions simultaneously. With Python 3.15.0 now available in actions/python-versions, maintainers can ensure their code works correctly with the newest language features and changes before users encounter issues.
The repository at https://github.com/actions/python-versions serves as the source for Python installations used by the actions/setup-python action. When new Python versions are added here, they become available for all GitHub Actions users without requiring changes to the setup action itself.
Configuration
To use Python 3.15.0 in a GitHub Actions workflow, add "3.15" to the testing matrix. A typical configuration might look like:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15']
This matrix configuration runs tests against six different Python versions. Each job in the matrix uses the actions/setup-python action, which pulls the appropriate Python installation from the python-versions repository.
The version string "3.15" resolves to Python 3.15.0 specifically. As patch releases become available (such as 3.15.1 or 3.15.2), the same version string will automatically use the latest patch version unless pinned more specifically.
Advanced Usage
Developers who need immediate access to new Python releases sometimes monitor the python-versions repository directly. One approach involves checking the repository periodically to detect when new versions land, though this typically only matters for projects that need to test against Python releases on the day they become available.
For most projects, simply updating the testing matrix when convenient provides sufficient coverage. The delay between a Python release and its availability in actions/python-versions is usually minimal, typically a few days at most.
Projects can also specify exact patch versions if needed, such as "3.15.0", though this prevents automatic updates to newer patch releases that fix bugs or security issues.
Caveats
While Python 3.15.0 is now available for testing, projects should consider their support strategy carefully. Adding a new Python version to the testing matrix doesn’t automatically mean the project officially supports that version - it simply verifies whether the code works correctly.
Some projects may encounter test failures with Python 3.15.0 due to deprecated features being removed or behavior changes in the language. These failures help identify compatibility issues before users report them.
The availability of Python 3.15.0 in GitHub Actions doesn’t guarantee that all dependencies or third-party libraries support this version yet. Projects with complex dependency chains may need to wait for the broader ecosystem to catch up before they can fully support Python 3.15.0 in production environments.
Source: simonwillison.net
Related Tips
Descriptors: Reusable Attribute Control in Python
Learn how to implement reusable attribute control in Python using properties, descriptors, and decorators to manage class attributes with validation, type
Profiling Mixed Line-Ending Preservation in Web-Edit
This article examines how web-based text editors handle and preserve mixed line endings in files, analyzing the technical challenges and implementation
LLM Plugin Connects OpenAI Decisions to CLI
A plugin that bridges OpenAI's language models with command-line interfaces, enabling AI-driven decisions to trigger and execute terminal commands directly