You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please test out the draft 2026 style in version 26.1a1! This style will be finalized in
the January release (26.1.0). Most of the changes in --preview will be in the 2026
stable style, but not all.
Please share your feedback!
This release (25.12.0) will still produce the 2025 style.
Highlights
Black no longer supports running with Python 3.9 (#4842)
Stable style
Fix bug where comments preceding # fmt: off/# fmt: on blocks were incorrectly
removed, particularly affecting Jupytext's # %% [markdown] comments (#4845)
Fix crash when multiple # fmt: skip comments are used in a multi-part if-clause, on
string literals, or on dictionary entries with long lines (#4872)
Fix possible crash when fmt: directives aren't on the top level (#4856)
Preview style
Fix fmt: skip skipping the line after instead of the line it's on (#4855)
Remove unnecessary parentheses from the left-hand side of assignments while preserving
magic trailing commas and intentional multiline formatting (#4865)
Fix fix_fmt_skip_in_one_liners crashing on with statements (#4853)
Fix fix_fmt_skip_in_one_liners crashing on annotated parameters (#4854)
Fix new lines being added after imports with # fmt: skip on them (#4894)
Packaging
Releases now include arm64 Windows binaries and wheels (#4814)
Integrations
Add output-file input to GitHub Action psf/black to write formatter output to a
file for artifact capture and log cleanliness (#4824)
Black no longer supports running with Python 3.9 (#4842)
Stable style
Fix bug where comments preceding # fmt: off/# fmt: on blocks were incorrectly
removed, particularly affecting Jupytext's # %% [markdown] comments (#4845)
Fix crash when multiple # fmt: skip comments are used in a multi-part if-clause, on
string literals, or on dictionary entries with long lines (#4872)
Fix possible crash when fmt: directives aren't on the top level (#4856)
Preview style
Fix fmt: skip skipping the line after instead of the line it's on (#4855)
Remove unnecessary parentheses from the left-hand side of assignments while preserving
magic trailing commas and intentional multiline formatting (#4865)
Fix fix_fmt_skip_in_one_liners crashing on with statements (#4853)
Fix fix_fmt_skip_in_one_liners crashing on annotated parameters (#4854)
Fix new lines being added after imports with # fmt: skip on them (#4894)
Packaging
Releases now include arm64 Windows binaries and wheels (#4814)
Integrations
Add output-file input to GitHub Action psf/black to write formatter output to a
file for artifact capture and log cleanliness (#4824)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Update documentation/README with new minimum Python version
Test thoroughly in CI with Python 3.10+
Option 2: Pin Black to 25.11.0 (Safe Alternative)
If Python 3.9 support must be maintained:
Update requirements/local.txt: black==25.11.0 (last version supporting Python 3.9)
Consider pinning in .pre-commit-config.yaml as well (currently at 25.1.0)
Additional Observations
Pre-commit Hook Version Drift:
.pre-commit-config.yaml (line 20): rev: 25.1.0
requirements/local.txt (current): black==25.9.0
This PR: black==25.12.0
These should be kept in sync. The pre-commit hooks will use version 25.1.0 while the dev environment uses 25.12.0, causing potential formatting inconsistencies.
Recommendation: Update both files to the same version (either 25.11.0 for Python 3.9 compatibility or 25.12.0 after upgrading to Python 3.10+).
Testing Requirements
If proceeding with the upgrade:
Run full backend test suite: docker compose -f test.yml run django pytest -n auto --dist loadscope
Run pre-commit hooks: pre-commit run --all-files
Verify no formatting changes break existing code
Check CI linter job passes with Python 3.12 (already configured in .github/workflows/backend.yml:38)
Code Quality Assessment
If Python compatibility is resolved, the dependency update itself is straightforward:
✅ Single-line change, minimal risk
✅ Black is a dev dependency, no runtime impact
✅ Includes useful bug fixes for # fmt: skip directives
⚠️ Requires version alignment across configuration files
Verdict: Do not merge until Python version requirements are resolved. Please clarify the project's Python version support policy and make the necessary coordinated updates.
Fixed crashes when fmt directives aren't at top level
Preview Style:
Fixed fmt: skip applying to wrong line
Removed unnecessary parentheses from assignment LHS
Fixed import formatting issues with # fmt: skip
Packaging:
Added arm64 Windows binaries
Security & Code Quality
✅ No security concerns - This is a legitimate dependency bump from Dependabot
✅ No code changes - Only updates version number in requirements
✅ Source verified - Official psf/black repository
Testing Recommendation
If proceeding despite Python 3.9 incompatibility:
Run pre-commit run --all-files in local environment
Ensure all formatting checks pass in CI
Verify no unexpected reformatting occurs
Verdict
❌ Do not merge until Python version compatibility is resolved. This will break the development toolchain for Python 3.9 environments.
Review conducted per CLAUDE.md guidelines - see Baseline Commit Rules and Pre-commit Hooks sections
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
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
dependenciesPull requests that update a dependency filepythonPull requests that update Python code
1 participant
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.
Bumps black from 25.9.0 to 25.12.0.
Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
Commits
782e560Pin actions/checkout@v5.0.0 (#4895)f0f4094Fix new lines being added after imports with# fmt: skipon them (#4894)70fc194Revert "Fix# fmt: skipignored in deeply nested expressions" (#4893)7044b14Prepare 25.12.0 release (#4891)5b470f0Fix# fmt: skipignored in deeply nested expressions (#4883)1b342efFix crash when multiple# fmt: skipcomments are used in multi-part if-clau...7b265f1Pin Hatch to hopefully fix Docker builds (#4878)c9523f4Attempt to fix Docker build failures (#4876)0f376e0Fix crashes when fmt directives are indented (#4856)a8bfcc1Fixfmt: skipskipping the line after instead of the line it's on (#4855)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)