Skip to content

Bump black from 24.3.0 to 26.3.1#408

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/black-26.3.1
Open

Bump black from 24.3.0 to 26.3.1#408
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/pip/black-26.3.1

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 12, 2026

Bumps black from 24.3.0 to 26.3.1.

Release notes

Sourced from black's releases.

26.3.1

Stable style

  • Prevent Jupyter notebook magic masking collisions from corrupting cells by using exact-length placeholders for short magics and aborting if a placeholder can no longer be unmasked safely (#5038)

Configuration

  • Always hash cache filename components derived from --python-cell-magics so custom magic names cannot affect cache paths (#5038)

Blackd

  • Disable browser-originated requests by default, add configurable origin allowlisting and request body limits, and bound executor submissions to improve backpressure (#5039)

26.3.0

Stable style

  • Don't double-decode input, causing non-UTF-8 files to be corrupted (#4964)
  • Fix crash on standalone comment in lambda default arguments (#4993)
  • Preserve parentheses when # type: ignore comments would be merged with other comments on the same line, preventing AST equivalence failures (#4888)

Preview style

  • Fix bug where if guards in case blocks were incorrectly split when the pattern had a trailing comma (#4884)
  • Fix string_processing crashing on unassigned long string literals with trailing commas (one-item tuples) (#4929)
  • Simplify implementation of the power operator "hugging" logic (#4918)

Packaging

  • Fix shutdown errors in PyInstaller builds on macOS by disabling multiprocessing in frozen environments (#4930)

Performance

  • Introduce winloop for windows as an alternative to uvloop (#4996)
  • Remove deprecated function uvloop.install() in favor of uvloop.new_event_loop() (#4996)
  • Rename maybe_install_uvloop function to maybe_use_uvloop to simplify loop installation and creation of either a uvloop/winloop evenloop or default eventloop (#4996)

Output

... (truncated)

Changelog

Sourced from black's changelog.

26.3.1

Stable style

  • Prevent Jupyter notebook magic masking collisions from corrupting cells by using exact-length placeholders for short magics and aborting if a placeholder can no longer be unmasked safely (#5038)

Configuration

  • Always hash cache filename components derived from --python-cell-magics so custom magic names cannot affect cache paths (#5038)

Blackd

  • Disable browser-originated requests by default, add configurable origin allowlisting and request body limits, and bound executor submissions to improve backpressure (#5039)

26.3.0

Stable style

  • Don't double-decode input, causing non-UTF-8 files to be corrupted (#4964)
  • Fix crash on standalone comment in lambda default arguments (#4993)
  • Preserve parentheses when # type: ignore comments would be merged with other comments on the same line, preventing AST equivalence failures (#4888)

Preview style

  • Fix bug where if guards in case blocks were incorrectly split when the pattern had a trailing comma (#4884)
  • Fix string_processing crashing on unassigned long string literals with trailing commas (one-item tuples) (#4929)
  • Simplify implementation of the power operator "hugging" logic (#4918)

Packaging

  • Fix shutdown errors in PyInstaller builds on macOS by disabling multiprocessing in frozen environments (#4930)

Performance

  • Introduce winloop for windows as an alternative to uvloop (#4996)
  • Remove deprecated function uvloop.install() in favor of uvloop.new_event_loop() (#4996)
  • Rename maybe_install_uvloop function to maybe_use_uvloop to simplify loop installation and creation of either a uvloop/winloop evenloop or default eventloop (#4996)

... (truncated)

Commits

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 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)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

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

---
updated-dependencies:
- dependency-name: black
  dependency-version: 26.3.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Mar 12, 2026
@dhalbert dhalbert requested a review from FoamyGuy March 12, 2026 22:45
@dhalbert
Copy link
Contributor

@FoamyGuy Are we still using black some places?

@FoamyGuy
Copy link
Contributor

@dhalbert black is still used in some places. The main thing that switched to ruff were circuitpython libraries. I think some of the infrastructure repos still use black instead.

In the case of Adabot here though I'm not entirely sure that Black needs to be in the requirements.txt file though. With a grep in this repo I find these results:

$ git grep -n "black"
.pre-commit-config.yaml:16:-   repo: https://github.com/psf/black
.pre-commit-config.yaml:19:    -   id: black
adabot/lib/circuitpython_library_validators.py:568:        black_repo = "repo: https://github.com/python/black"
adabot/lib/circuitpython_library_validators.py:569:        black_version = "rev: 22.4.0"
adabot/lib/circuitpython_library_validators.py:571:        if black_repo not in text or black_version not in text:
patches/0001-Added-pre-commit-and-SPDX-copyright.patch:27:-    - name: Pip install pylint, black, & Sphinx
patches/0001-Added-pre-commit-and-SPDX-copyright.patch:30:-        pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
patches/0001-Added-pre-commit-and-SPDX-copyright.patch:37:-        black --check --target-version=py35 .
patches/0001-Added-pre-commit-config-file.patch:22:+-   repo: https://github.com/python/black
patches/0001-Added-pre-commit-config-file.patch:25:+    - id: black
patches/0001-Hardcoded-Black-and-REUSE-versions.patch:17: -   repo: https://github.com/python/black
patches/0001-Hardcoded-Black-and-REUSE-versions.patch:21:     - id: black
patches/0001-Update-Black-to-latest.patch:17: -   repo: https://github.com/python/black
patches/0001-Update-Black-to-latest.patch:21:     - id: black
patches/0001-build.yml-add-black-formatting-check.patch:4:Subject: [PATCH] build.yml: add black formatting check
patches/0001-build.yml-add-black-formatting-check.patch:19:+        black --check --target-version=py35 .
patches/09MAY2023_precommit_update.patch:17:   - repo: https://github.com/python/black
patches/09MAY2023_precommit_update.patch:21:       - id: black
patches/inclusive-terminology.patch:18:-# Add files or directories to the blacklist. They should be base names, not
patches/inclusive-terminology.patch:23:-# Add files or directories matching the regex patterns to the blacklist. The
requirements.txt:5:black==24.3.0

Many instances are inside of patches/ which shouldn't matter, they were just past patches applied via adabot.

The instances outside of patches are in .pre-commit-config.yaml which I think manages it's own dependencies when run so doesn't need to be in requirements.txt. Though we should update the version inside pre-commit config which dependabot didn't do.

- repo: https://github.com/psf/black
rev: 24.3.0

And a few in the validator code here:

black_repo = "repo: https://github.com/python/black"
black_version = "rev: 22.4.0"
if black_repo not in text or black_version not in text:
errors.append(ERROR_BLACK_VERSION)

which do not seem to use the library itself, but rather validate it's existence in library pre-commit configs. This code should be removed or changed to ruff in any case.

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