Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 6, 2026

Bumps black from 25.9.0 to 25.12.0.

Release notes

Sourced from black's releases.

25.12.0

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)

25.11.0

Highlights

  • Enable base 3.14 support (#4804)
  • Add support for the new Python 3.14 t-string syntax introduced by PEP 750 (#4805)

Stable style

  • Fix bug where comments between # fmt: off and # fmt: on were reformatted (#4811)
  • Comments containing fmt directives now preserve their exact formatting instead of being normalized (#4811)

... (truncated)

Changelog

Sourced from black's changelog.

25.12.0

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)

25.11.0

Highlights

  • Enable base 3.14 support (#4804)
  • Add support for the new Python 3.14 t-string syntax introduced by PEP 750 (#4805)

Stable style

  • Fix bug where comments between # fmt: off and # fmt: on were reformatted (#4811)
  • Comments containing fmt directives now preserve their exact formatting instead of being normalized (#4811)

Preview style

  • Move multiline_string_handling from --unstable to --preview (#4760)
  • Fix bug where module docstrings would be treated as normal strings if preceded by comments (#4764)

... (truncated)

Commits
  • 782e560 Pin actions/checkout@v5.0.0 (#4895)
  • f0f4094 Fix new lines being added after imports with # fmt: skip on them (#4894)
  • 70fc194 Revert "Fix # fmt: skip ignored in deeply nested expressions" (#4893)
  • 7044b14 Prepare 25.12.0 release (#4891)
  • 5b470f0 Fix # fmt: skip ignored in deeply nested expressions (#4883)
  • 1b342ef Fix crash when multiple # fmt: skip comments are used in multi-part if-clau...
  • 7b265f1 Pin Hatch to hopefully fix Docker builds (#4878)
  • c9523f4 Attempt to fix Docker build failures (#4876)
  • 0f376e0 Fix crashes when fmt directives are indented (#4856)
  • a8bfcc1 Fix fmt: skip skipping the line after instead of the line it's on (#4855)
  • Additional commits viewable in compare view

Dependabot compatibility score

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)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 6, 2026
@claude
Copy link

claude bot commented Jan 6, 2026

PR Review: Black 25.9.0 → 25.12.0 Dependency Update

⚠️ CRITICAL ISSUE - Python Version Incompatibility

REJECT: This PR introduces a breaking change that is incompatible with the project's current Python version requirements.

Issue Details

Black 25.12.0 drops Python 3.9 support (see release notes), but this project still targets Python 3.9:

  1. Pre-commit configuration (.pre-commit-config.yaml:17): Uses --py39-plus flag for pyupgrade
  2. Mypy configuration (setup.cfg:34): Set to python_version = 3.9
  3. PyTorch base image: pytorch/pytorch:2.7.1-cuda12.6-cudnn9-runtime (likely includes Python 3.9 compatibility)

Required Actions Before Merge

Option 1: Upgrade Project to Python 3.10+ (Recommended)
If the project is ready to drop Python 3.9 support:

  1. Update .pre-commit-config.yaml: Change --py39-plus--py310-plus (line 17)
  2. Update setup.cfg: Change python_version = 3.9python_version = 3.10 (line 34)
  3. Verify PyTorch base image supports Python 3.10+
  4. Update documentation/README with new minimum Python version
  5. 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:

  1. Update requirements/local.txt: black==25.11.0 (last version supporting Python 3.9)
  2. 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.

@JSv4
Copy link
Collaborator

JSv4 commented Jan 9, 2026

@dependabot rebase

Bumps [black](https://github.com/psf/black) from 25.9.0 to 25.12.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@25.9.0...25.12.0)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 25.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/black-25.12.0 branch from 6a641fa to 505ce27 Compare January 9, 2026 12:58
@claude
Copy link

claude bot commented Jan 9, 2026

Pull Request Review: Black 25.9.0 → 25.12.0

⚠️ Critical Compatibility Issue

BLOCK: This PR introduces a breaking change.

Black 25.12.0 has dropped Python 3.9 support (see psf/black#4842), but this project still targets Python 3.9:

  • setup.cfg:34: python_version = 3.9
  • Project uses PyTorch base images that may still run Python 3.9

Impact: This dependency update will cause black to fail when running on Python 3.9, breaking:

  • Pre-commit hooks
  • CI formatting checks
  • Developer workflows

Recommendation

Option 1: Block this PR until Python upgrade (Recommended)

  1. First upgrade project to Python 3.10+ across all environments
  2. Update setup.cfg mypy configuration
  3. Update Docker base images if needed
  4. Then accept this black upgrade

Option 2: Pin black to 25.11.0

  • Black 25.11.0 is the last version supporting Python 3.9
  • Provides recent bug fixes without breaking compatibility
  • Change: black==25.11.0 instead of black==25.12.0

What's New in Black 25.12.0

Stable Style Fixes:

  • Fixed comment removal bugs with # fmt: off/on blocks (affects Jupytext)
  • Fixed crashes with multiple # fmt: skip comments
  • 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:

  1. Run pre-commit run --all-files in local environment
  2. Ensure all formatting checks pass in CI
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants