Migrating to Black 25.9.0
Version 25.9.0 introduces 1 breaking change. This guide details how to update your code.
Released: 9/19/2025
1
Breaking Changes
4
Migration Steps
7
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
black.Tokenizerblack.Parserblack.format_strblack.format_fileblack.Integration.vimblack.GitHubActionblack.exception_handlingBreaking Changes
●Issue #1
Support for Python versions earlier than 3.7 has been removed; `await` and `async` can no longer be used as soft‑keyword or variable names. Update code to avoid using these identifiers on older Python versions or bump the interpreter to >=3.7.
Migration Steps
- 1Rename any variables or attributes named `await` or `async` to avoid using these identifiers.
- 2If you rely on parentheses around multiple exception types without an `as` clause, remove the parentheses to match the new syntax.
- 3Update your pyproject.toml to include `[project.dependency-groups]` if you use the `psf/black` GitHub Action and want version detection.
- 4Rebuild Docker images if you depend on the gallery image to pull the new `python3-slim` based version.
Release Summary
This release drops support for Python <3.7, adds several new formatting capabilities and performance improvements, and fixes numerous crashes and edge‑case bugs.
Need More Details?
View the full release notes and all changes for Black 25.9.0.
View Full Changelog