Skip to content

Update dependency black to v26 - #83

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/black-26.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/black-26.x

Conversation

@renovate

@renovate renovate Bot commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
black (changelog) ==23.12.1 → ==26.10.1 age confidence

Release Notes

psf/black (black)

v26.10.1

Compare Source

Highlights

This release fixes a security issue in Black's bundled GitHub Action. Repositories that
use the action are encouraged to update to the latest version of Black immediately. This
update is received automatically when using psf/black@stable, and is independent of
the version of Black installed by the action.

When the GitHub Action reads version specifiers from tool.black.required-version, it
now only accepts released versions of Black, as it already did for black requirements
in dependency lists. Other values, such as URL references, are now rejected. This issue
has been registered as GHSA-cg8m-r9f2-5wm2; a CVE identifier is pending.

Stable style
  • Fix a long Jupyter notebook assignment magic (for example x = !ls -la) being wrapped
    in parentheses, which IPython can no longer run; such cells are now left unchanged
    (#​5481)
  • Keep repeated lines outside the selected --line-ranges unchanged (#​5436)
  • Fix --line-ranges formatting lines that follow a statement when formatting joins or
    re-indents that statement (#​5484)
  • Fix --line-ranges crashing with an internal error when an unselected statement has a
    # fmt: skip comment on the last line before a closing bracket (#​5477)
  • Prevent moving an encoding declaration (for example # -*- coding: latin-1 -*-) onto
    the first two lines of a file (#​5487)
  • Fix adding an extra trailing blank line inside a multi-line module docstring when its
    last line is near the line length limit (#​5494)
Preview style
  • Do not split short expressions on delimiters (such as binary operators, comparisons,
    or comprehensions) inside brackets when preceded by a standalone comment (#​5455)
  • Fix the unstable string_processing feature removing backslash-newline sequences from
    raw strings, which changed their value (#​5482)
  • Avoid adding unnecessary parentheses around unbreakable right-hand side expressions in
    assignments (such as annotated assignments or subscript targets) (#​5473)
  • Parenthesize expressions with parameter comments when they exceed the line length
    under --preview (#​5442)
  • Fix wrap_long_dict_values_in_parens dropping the parentheses around a right-hand
    side that contains a dictionary, leaving a line over the length limit (#​5492)
  • Fix the unstable string_processing feature adding a space after * or ** in a PEP
    695 type parameter (* Ts = ...) when it splits a string in the parameter's default
    (#​5504)
  • Avoid unnecessary line splits of trailers (such as indexing/subscripts) when an
    earlier bracket split exceeds the line length only due to a trailing comment (#​5498)
Configuration
  • Add --cache-dir to configure the cache directory from the command line (#​5433)
  • Don't cache a file as formatted after formatting or checking it with --line-ranges,
    which made a later full black --check pass and black skip the unformatted lines
    (#​5476)
  • Respect a .gitignore that starts with a UTF-8 byte order mark. The mark became part
    of the first pattern, so that pattern never matched and Black formatted files that git
    ignores (#​5497)
Performance
  • Avoid quadratic runtime when splitting very long lines with many trailing bracket
    pairs (such as consecutive subscripts) (#​5475)
Integrations
  • Fix the GitHub Action crashing on dependency-group includes when use_pyproject is
    enabled (#​5479)
  • When the GitHub Action reads version specifiers from tool.black.required-version, it
    now only accepts released versions of Black, as it already did for black
    requirements in dependency lists. Other values, such as URL references, are now
    rejected. (#​5510)

v26.10.0

Compare Source

Stable style
  • --line-ranges no longer inserts an empty line after a docstring when the range
    covers only the docstring itself (#​5312)
  • Fix # fmt: skip on a bracketed ternary turning the surrounding tuple into a call
    (#​5464)
  • Fix crash when # fmt: skip is placed on a one-line function or class with PEP 695
    type parameters (#​5429)
  • Fix an inline comment after the closing bracket of optional parentheses being moved
    inside the parentheses when the parenthesized expression contains own-line comments
    (#​5395)
  • Fix unparseable output when # fmt: skip is placed on a bracket of an if, while,
    for, or with header (#​5401, #​5405)
  • Fix crash when formatting parenthesized expressions with multiple inline comments and
    # fmt: skip (#​5414)
  • Fix parsing Jupyter notebook assignment magics when non-ASCII characters appear
    earlier on the line (#​5381)
  • Preserve blank lines that come immediately before a # fmt: on comment (#​5300)
  • Keep the parentheses around the target of an annotated assignment (e.g.
    (x): int = 5), which prevent CPython from including the name in __annotations__
    (#​5321)
  • Stop treating a t-string in docstring position as a docstring (e.g. t" spam " as
    the first statement of a module, class or function) (#​5287)
  • Fix unparseable output for a t-string whose replacement field contains a quote (e.g.
    t'\'{a["b"]}\'') (#​5265)
  • Fix unparseable output for a triple-quoted string whose body ends in an
    already-escaped double quote (e.g. '''\'''\"''') (#​5262)
  • Fix --skip-magic-trailing-comma dropping the trailing comma from a split
    single-element tuple used as a lambda parameter default (#​5246)
  • Fix unstable formatting when an inline comment sits on optional parentheses (e.g. a
    parenthesized assert message) (#​5241)
  • Fix --skip-magic-trailing-comma dropping the trailing comma of a one-element
    subscript (a[x,]) when the line is long enough to be split and contains a power
    operator (#​5272)
  • Fix crash when a standalone comment sits between tokens of a comprehension or lambda
    (#​5144)
  • Fix inline comments on a bracket inside a comprehension being dropped (#​5330)
  • Respect the magic trailing comma in a PEP 695 type parameter list containing a
    *TypeVarTuple or **ParamSpec (#​5244)
  • Fix crash when a comment-only # fmt: off/# fmt: on block is followed by a with
    statement after another standalone comment (#​5189)
  • Fix a crash when splitting case case if ... match patterns at very small line
    lengths (#​5147)
  • Fix multiline docstring indentation when leading tabs are used inside indented
    docstrings (#​5148)
  • Respect # fmt: skip on a line that opens a bracket (e.g.
    from x import ( # fmt: skip) when a standalone comment is among the bracket's
    contents (#​5161)
  • Fix an AST safety error when separate # type: ignore comments in a parenthesized
    attribute chain were merged onto one physical line (#​5297)
  • Preserve comments and blank lines outside requested ranges when formatting with
    --line-ranges (#​5175)
  • Fix crash when # fmt: skip is used on one-line async def, async with, and
    async for statements containing a semicolon (#​5311)
  • Stop converting form feeds or other similar characters in docstrings into newlines
    (#​5461)
  • Fix --skip-source-first-line turning the skipped line's CRLF ending into \r\r\n
    when reformatting a file with CRLF line endings (#​5438)
Preview style
New preview features
  • Add missing blank lines after classes whose last method has an ellipsis body (#​5439)
  • Split only the brackets holding a magic trailing comma when more trailers follow them
    (e.g. stop splitting inside the [2] of [1,][2](3)) (#​5448)
  • Keep dictionary keys containing operators together on one line when the value can be
    wrapped onto a new line instead (#​5435)
  • Remove redundant parentheses around individual variables in unpacking targets (e.g.
    for (x), (y) in points: becomes for x, y in points:) (#​5416)
  • Normalize uppercase T prefixes on t-strings to lowercase (#​5425)
  • Remove redundant parentheses around generator expressions (#​5304, #​5369)
  • Preserve two blank lines before a top-level class starting inside a # fmt: off block
    after an import (#​5238)
  • Fix unnecessary parentheses around short right-hand expressions in indexed assignments
    (e.g. x[key] = expr) (#​5095)
  • Parenthesize tuple expressions in yield statements for consistency with function
    calls and returns (#​5170)
  • Stop splitting between a variable and its operator (not in, ==, is, ...) when
    the right-hand side is a bracketed expression, and instead split inside the brackets
    (#​5135)
  • In .pyi stub files, enforce a blank line after a function or method that has a
    docstring-only body when another comment or statement follows it (#​5158)
Updates to existing preview features
  • Fix crash in stub files when # fmt: skip is placed on a function in a group of
    same-name decorated functions (e.g. @overloads or a property setter) (#​5430)
  • Keep the parentheses around a lambda used as the iterable of a comprehension (e.g.
    [x for x in (lambda: 0) if x]) (#​5176, #​5200)
Updates to existing unstable features
  • Do not treat multi-line expressions with merged strings and trailing # type: ignore
    comments as single-line unsplittable expressions (#​5466)
  • Fix duplicated inline comment when stripping the parentheses around a string or
    merging a backslash-continued string on the same line (#​5449)
  • Split long stringified return annotations even when the function has parameters
    (#​5427)
  • Don't hug brackets when doing so would join two # type: ignore comments onto one
    line (#​5271)
  • Fix a crash when # type: ignore is lost during formatting of a long parenthesized
    string (#​5329)
  • Fix only the first part of an implicitly concatenated unmergeable string (e.g.
    r"..." r"...") being wrapped in parentheses (#​5434)
Configuration
  • Add support for NO_COLOR environment variable to disable ANSI output (#​5129)
  • Remove spurious target version warning when runtime version is included in a
    --target-version flag (#​5167)
  • Fix --force-exclude not excluding files whose path contains .. (e.g.
    black ../generated/file.py run from a subdirectory) (#​5471)
  • Fall back to the default configuration, with a warning, when the given sources share
    no common project root (e.g. they are on different drives on Windows) instead of
    crashing (#​5386)
  • Fix loading a stale cached pyproject.toml path when --code is used from different
    working directories in the same process (#​5152)
  • Add validation for --line-ranges values (#​5107)
  • Ignore empty cache files instead of raising an EOFError (#​5192)
  • Reject non-string include and force-exclude values in pyproject.toml (#​5193)
  • Validate BLACK_NUM_WORKERS values and report invalid values as usage errors instead
    of crashing (#​5211)
  • Ignore permission errors when reading cache (#​5258)
Packaging
  • Reduce the size of Linux standalone binaries by stripping debug symbols during the
    PyInstaller release build (#​5223)
  • Black is now released using GitHub
    Immutable Releases
    (#​5296)
Performance
  • Fix superlinear runtime growth with the number of input files (#​5450)
  • Improve performance on strings containing many consecutive backslashes (#​5163)
  • Improve performance on files with many # fmt: skip/# fmt: off/# fmt: on comments
    (#​5169, #​5190, #​5232)
  • Improve performance on long calls and collections (#​5177)
  • Improve performance on multiline strings inside large collections (e.g. a dict literal
    with triple-quoted strings as values) (#​5188)
  • Improve performance on files with many soft keywords (e.g. match/case blocks)
    (#​5186)
  • Improve performance on long semicolon-separated statements (in the stable style) and
    large dict literals (in --preview) (#​5184)
  • Improve performance of --line-ranges on files with many sibling blocks (a long
    if/elif chain, a match with many cases, or many top-level definitions) (#​5213)
  • Improve performance on deeply nested bracketed expressions (#​5171, #​5242)
  • Improve performance on lists and subscripts holding one long expression without
    operators (e.g. a long run of implicitly concatenated strings inside []) (#​5239)
  • Improve performance on deeply chained operations (e.g. a long a ** b ** c ** ...
    chain) (#​5235)
  • Improve performance on long if/elif chains and other compound statements with many
    clauses (#​5322)
  • Improve performance of string_processing:
    • when merging implicitly concatenated f-strings containing long string literals
      (#​5165)
    • when merging long implicitly concatenated strings (#​5173, #​5194)
    • when rewriting large nodes (e.g. "%s ..." % (a, b, c, ...)) (#​5178, #​5199, #​5220)
    • when splitting long string literals (#​5183)
Output
  • Report parser failures using editor-friendly path:line:column locations (#​5237)
  • Fix crash when writing formatted code or diffs to a sys.stdout that has no buffer
    attribute (e.g. in Jupyter notebooks) (#​5411)
  • Report parse failures on Black's own output as internal errors (#​5383)
Blackd
  • Return HTTP 400 instead of 500 when the X-Python-Variant header is empty or has an
    empty entry (e.g. a trailing comma) (#​5428)
  • Allow optional whitespace around comma-separated versions and pyi in the
    X-Python-Variant header (#​5441)
Integrations
  • Remove unused migrate-black script (#​5319)
  • Support PEP 440 version specifiers in tool.black.required-version for the GitHub
    Action (#​5399)
  • Add outputs (is_formatted, change_count, same_count, failure_count) to GitHub
    Action runs (#​5408)
Documentation
  • Document vim-python-pep8-indent, which provides an indentexpr for Black-style
    insert-mode indentation (#​5288)

v26.5.1

Compare Source

Stable style
  • Fix unstable formatting of annotated assignments whose subscript annotation contains
    an inline comment (e.g. x: list[ # pyright: ignore[...]) (#​5130)
  • Preserve inline comments (including # type: ignore) immediately before a
    # fmt: skip line, avoiding AST equivalence failures (#​5139)
Packaging
  • Correct the version in the published executables (#​5137)
Documentation
  • Add Neovim integration guide covering conform.nvim, ALE, and simple command approaches
    (#​5124)

v26.5.0

Compare Source

Highlights
  • Add support for unpacking in comprehensions (PEP 798) and for lazy imports (PEP 810),
    both new syntactic features in Python 3.15 (#​5048)
  • Python 3.15 is now supported. Compiled wheels are not yet provided for Python 3.15, so
    performance may be slower than on existing Python versions. Wheels will be provided
    once Python 3.15 is later in its release cycle. (#​5127)
Stable style
  • Fix # fmt: skip being ignored in nested if expressions with parenthesized in
    clauses (#​4903)
  • Add syntactic support for Python 3.15 (#​5048)
  • Fix crash when an f-string follows a # fmt: off comment inside brackets (#​5097)
  • Preserve multiline compound statement headers when # fmt: skip is placed on the
    colon line (#​5117)
Preview style
  • Improve heuristics around whether blank lines should appear before, within and after
    groups of same-name decorated functions (such as @overload groups) in .pyi stub
    files (#​5021)
  • Fix blank lines being removed between a function and a decorated class in .pyi stub
    files (#​5092)
  • Prevent string merger from creating unsplittable long lines when a pragma comment
    (e.g. # type: ignore) follows the closing bracket (#​5096)
Packaging
Output
  • Improve parse error readability by showing multi-line output with an error pointer.
    (#​5068)
  • Add SourceASTParseError to distinguish source parse failures from internal safety
    errors, improving error reporting when Black's lenient parser accepts input that
    ast.parse() rejects (#​5080)
Blackd
  • Return HTTP 400 (Bad Request) for source parse failures instead of HTTP 500, keeping
    HTTP 500 only for genuine internal safety errors (#​5080)
Integrations
  • Added documentation for doctest formatting tools and updated the integrations index to
    match (#​4916)
Documentation
  • Use "Version X.Y.Z" headings in changelog for stable permalink anchors on ReadTheDocs
    (#​5063)
  • Note in the editor integrations that the SublimeText sublack plugin is archived and
    unmaintained (#​5082)

v26.3.1

Compare Source

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)

v26.3.0

Compare Source

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 eventloop or default eventloop
    (#​4996)
Output
  • Emit a clear warning when the target Python version is newer than the running Python
    version, since AST safety checks cannot parse newer syntax. Also replace the
    misleading "INTERNAL ERROR" message with an actionable error explaining the version
    mismatch (#​4983)
Blackd
  • Introduce winloop to be used when windows in use which enables blackd to run faster on
    windows when winloop is installed. (#​4996)
Integrations
  • Remove unused gallery script (#​5030)
  • Harden parsing of black requirements in the GitHub Action when use_pyproject is
    enabled so that only version specifiers are accepted and direct references such as
    black @ https://... are rejected. Users should upgrade to the latest version of the
    action as soon as possible. This update is received automatically when using
    psf/black@stable, and is independent of the version of Black installed by the
    action. (#​5031)
Documentation
  • Expand preview style documentation with detailed examples for wrap_comprehension_in,
    simplify_power_operator_hugging, and wrap_long_dict_values_in_parens features
    (#​4987)
  • Add detailed documentation for formatting Jupyter Notebooks (#​5009)

v26.1.0

Compare Source

Highlights

Introduces the 2026 stable style (#​4892), stabilizing the following changes:

  • always_one_newline_after_import: Always force one blank line after import
    statements, except when the line after the import is a comment or an import statement
    (#​4489)
  • fix_fmt_skip_in_one_liners: Fix # fmt: skip behavior on one-liner declarations,
    such as def foo(): return "mock" # fmt: skip, where previously the declaration would
    have been incorrectly collapsed (#​4800)
  • fix_module_docstring_detection: Fix module docstrings being treated as normal
    strings if preceded by comments (#​4764)
  • fix_type_expansion_split: Fix type expansions split in generic functions (#​4777)
  • multiline_string_handling: Make expressions involving multiline strings more compact
    (#​1879)
  • normalize_cr_newlines: Add \r style newlines to the potential newlines to
    normalize file newlines both from and to (#​4710)
  • remove_parens_around_except_types: Remove parentheses around multiple exception
    types in except and except* without as (#​4720)
  • remove_parens_from_assignment_lhs: Remove unnecessary parentheses from the left-hand
    side of assignments while preserving magic trailing commas and intentional multiline
    formatting (#​4865)
  • standardize_type_comments: Format type comments which have zero or more spaces
    between # and type: or between type: and value to # type: (value) (#​4645)

The following change was not in any previous stable release:

  • Regenerated the _width_table.py and added tests for the Khmer language (#​4253)

This release also bumps pathspec to v1 and fixes inconsistencies with Git's
.gitignore logic (#​4958). Now, files will be ignored if a pattern matches them, even
if the parent directory is directly unignored. For example, Black would previously
format exclude/not_this/foo.py with this .gitignore:

exclude/
!exclude/not_this/

Now, exclude/not_this/foo.py will remain ignored. To ensure exclude/not_this/ and
all of its children are included in formatting (and in Git), use this .gitignore:

*/exclude/*
!*/exclude/not_this/

This new behavior matches Git. The leading */ are only necessary if you wish to ignore
matching subdirectories (like the previous behavior did), and not just matching root
directories.

Output
  • Explicitly shutdown the multiprocessing manager when run in diff mode too (#​4952)
Integrations
  • Upgraded PyPI upload workflow to use Trusted Publishing (#​4611)

v25.12.0

Compare Source

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)

v25.11.0

Compare Source

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)
  • Fix bug where python 3.12 generics syntax split line happens weirdly (#​4777)
  • Standardize type comments to form # type: <value> (#​4645)
  • Fix fix_fmt_skip_in_one_liners preview feature to respect # fmt: skip for compound
    statements with semicolon-separated bodies (#​4800)
Configuration
  • Add no_cache option to control caching behavior. (#​4803)
Packaging
  • Releases now include arm64 Linux binaries (#​4773)
Output
  • Write unchanged content to stdout when excluding formatting from stdin using pipes
    (#​4610)
Blackd
  • Implemented BlackDClient. This simple python client allows to easily send formatting
    requests to blackd (#​4774)
Integrations
  • Enable 3.14 base CI (#​4804)
  • Enhance GitHub Action psf/black to support the required-version major-version-only
    "stability" format when using pyproject.toml (#​4770)
  • Improve error message for vim plugin users. It now handles independently vim version
  • Vim: Warn on unsupported Vim and Python versions independently (#​4772)
  • Vim: Print the import paths when importing black fails (#​4675)
  • Vim: Fix handling of virtualenvs that have a different Python version (#​4675)

v25.9.0

Compare Source

Highlights
  • Remove support for pre-python 3.7 await/async as soft keywords/variable names
    (#​4676)
Stable style
  • Fix crash while formatting a long del statement containing tuples (#​4628)
  • Fix crash while formatting expressions using the walrus operator in complex with
    statements (#​4630)
  • Handle # fmt: skip followed by a comment at the end of file (#​4635)
  • Fix crash when a tuple appears in the as clause of a with statement (#​4634)
  • Fix crash when tuple is used as a context manager inside a with statement (#​4646)
  • Fix crash when formatting a \ followed by a \r followed by a comment (#​4663)
  • Fix crash on a \\r\n (#​4673)
  • Fix crash on await ... (where ... is a literal Ellipsis) (#​4676)
  • Fix crash on parenthesized expression inside a type parameter bound (#​4684)
  • Fix crash when using line ranges excluding indented single line decorated items
    (#​4670)
Preview style
  • Fix a bug where one-liner functions/conditionals marked with # fmt: skip would still
    be formatted (#​4552)
  • Improve multiline_string_handling with ternaries and dictionaries (#​4657)
  • Fix a bug where string_processing would not split f-strings directly after
    expressions (#​4680)
  • Wrap the in clause of comprehensions across lines if necessary (#​4699)
  • Remove parentheses around multiple exception types in except and except* without
    as. (#​4720)
  • Add \r style newlines to the potential newlines to normalize file newlines both from
    and to (#​4710)
Parser
  • Rewrite tokenizer to improve performance and compliance (#​4536)
  • Fix bug where certain unusual expressions (e.g., lambdas) were not accepted in type
    parameter bounds and defaults. (#​4602)
Performance
  • Avoid using an extra process when running with only one worker (#​4734)
Integrations
  • Fix the version check in the vim file to reject Python 3.8 (#​4567)
  • Enhance GitHub Action psf/black to read Black version from an additional section in
    pyproject.toml: [project.dependency-groups] (#​4606)
  • Build gallery docker image with python3-slim and reduce image size (#​4686)
Documentation
  • Add FAQ entry for windows emoji not displaying (#​4714)

v25.1.0

Compare Source

Highlights

This release introduces the new 2025 stable style (#​4558), stabilizing the following
changes:

  • Normalize casing of Unicode escape characters in strings to lowercase (#​2916)
  • Fix inconsistencies in whether certain strings are detected as docstrings (#​4095)
  • Consistently add trailing commas to typed function parameters (#​4164)
  • Remove redundant parentheses in if guards for case blocks (#​4214)
  • Add parentheses to if clauses in case blocks when the line is too long (#​4269)
  • Whitespace before # fmt: skip comments is no longer normalized (#​4146)
  • Fix line length computation for certain expressions that involve the power operator
    (#​4154)
  • Check if there is a newline before the terminating quotes of a docstring (#​4185)
  • Fix type annotation spacing between * and more complex type variable tuple (#​4440)

The following changes were not in any previous release:

  • Remove parentheses around sole list items (#​4312)
  • Generic function definitions are now formatted more elegantly: parameters are split
    over multiple lines first instead of type parameter definitions (#​4553)
Stable style
  • Fix formatting cells in IPython notebooks with magic methods and starting or trailing
    empty lines (#​4484)
  • Fix crash when formatting with statements containing tuple generators/unpacking
    (#​4538)
Preview style
  • Fix/remove string merging changing f-string quotes on f-strings with internal quotes
    (#​4498)
  • Collapse multiple empty lines after an import into one (#​4489)
  • Prevent string_processing and wrap_long_dict_values_in_parens from removing
    parentheses around long dictionary values (#​4377)
  • Move wrap_long_dict_values_in_parens from the unstable to preview style (#​4561)
Packaging
  • Store license identifier inside the License-Expression metadata field, see
    PEP 639. (#​4479)
Performance
  • Speed up the is_fstring_start function in Black's tokenizer (#​4541)
Integrations
  • If using stdin with --stdin-filename set to a force excluded path, stdin won't be
    formatted. (#​4539)

v24.10.0

Compare Source

Highlights
  • Black is now officially tested with Python 3.13 and provides Python 3.13
    mypyc-compiled wheels. (#​4436) (#​4449)
  • Black will issue an error when used with Python 3.12.5, due to an upstream memory
    safety issue in Python 3.12.5 that can cause Black's AST safety checks to fail. Please
    use Python 3.12.6 or Python 3.12.4 instead. (#​4447)
  • Black no longer supports running with Python 3.8 (#​4452)
Stable style
  • Fix crashes involving comments in parenthesised return types or X | Y style unions.
    (#​4453)
  • Fix skipping Jupyter cells with unknown %% magic (#​4462)
Preview style
  • Fix type annotation spacing between * and more complex type variable tuple (i.e.
    def fn(*args: *tuple[*Ts, T]) -> None: pass) (#​4440)
Caching
  • Fix bug where the cache was shared between runs with and without --unstable (#​4466)
Packaging
  • Upgrade version of mypyc used to 1.12 beta (#​4450) (#​4449)
  • blackd now requires a newer version of aiohttp. (#​4451)
Output
  • Added Python target version information on parse error (#​4378)
  • Add information about Black version to internal error messages (#​4457)

v24.8.0

Compare Source

Stable style
  • Fix crash when # fmt: off is used before a closing parenthesis or bracket. (#​4363)
Packaging
  • Packaging metadata updated: docs are explicitly linked, the issue tracker is now also
    linked. This improves the PyPI listing for Black. (#​4345)
Parser
  • Fix regression where Black failed to parse a multiline f-string containing another
    multiline string (#​4339)
  • Fix regression where Black failed to parse an escaped single quote inside an f-string
    (#​4401)
  • Fix bug with Black incorrectly parsing empty lines with a backslash (#​4343)
  • Fix bugs with Black's tokenizer not handling \{ inside f-strings very well (#​4422)
  • Fix incorrect line numbers in the tokenizer for certain tokens within f-strings
    (#​4423)
Performance
  • Improve performance when a large directory is listed in .gitignore (#​4415)
Blackd
  • Fix blackd (and all extras installs) for docker container (#​4357)

v24.4.2

Compare Source

This is a bugfix release to fix two regressions in the new f-string parser introduced in
24.4.1.

Parser
  • Fix regression where certain complex f-strings failed to parse (#​4332)
Performance
  • Fix bad performance on certain complex string literals (#​4331)

v24.4.1

Compare Source

Highlights
  • Add support for the new Python 3.12 f-string syntax introduced by PEP 701 (#​3822)
Stable style
  • Fix crash involving indented dummy functions containing newlines (#​4318)
Parser
  • Add support for type parameter defaults, a new syntactic feature added to Python 3.13
    by PEP 696 (#​4327)
Integrations
  • Github Action now works even when git archive is skipped (#​4313)

v24.4.0

Compare Source

Stable style
  • Fix unwanted crashes caused by AST equivalency check (#​4290)
Preview style
  • if guards in case blocks are now wrapped in parentheses when the line is too long.
    (#​4269)
  • Stop moving multiline strings to a new line unless inside brackets (#​4289)
Integrations
  • Add a new option use_pyproject to the GitHub Action psf/black. This will read the
    Black version from pyproject.toml. (#​4294)

v24.3.0

Compare Source

Highlights

This release is a milestone: it fixes Black's first CVE security vulnerability. If you
run Black on untrusted input, or if you habitually put thousands of leading tab
characters in your docstrings, you are strongly encouraged to upgrade immediately to fix
CVE-2024-21503.

This release also fixes a bug in Black's AST safety check that allowed Black to make
incorrect changes to certain f-strings that are valid in Python 3.12 and higher.

Stable style
  • Don't move comments along with delimiters, which could cause crashes (#​4248)
  • Strengthen AST safety check to catch more unsafe changes to strings. Previous versions
    of Black would incorrectly format the contents of certain unusual f-strings containing
    nested strings with the same quote type. Now, Black will crash on such strings until
    support for the new f-string syntax is implemented. (#​4270)
  • Fix a bug where line-ranges exceeding the last code line would not work as expected
    (#​4273)
Performance
  • Fix catastrophic performance on docstrings that contain large numbers of leading tab
    characters. This fixes
    CVE-2024-21503.
    (#​4278)
Documentation
  • Note what happens when --check is used with --quiet (#​4236)

v24.2.0

Compare Source

Stable style
  • Fixed a bug where comments where mistakenly removed along with redundant parentheses
    (#​4218)
Preview style
  • Move the hug_parens_with_braces_and_square_brackets feature to the unstable style
    due to an outstanding crash and proposed formatting tweaks (#​4198)
  • Fixed a bug where base expressions caused inconsistent formatting of ** in ternary
    expression (#​4154)
  • Checking for newline before adding one on docstring that is almost at the line limit
    (#​4185)
  • Remove redundant parentheses in case statement if guards (#​4214).
Configuration
  • Fix issue where Black would ignore input files in the presence of symlinks (#​4222)
  • Black now ignores pyproject.toml that is missing a tool.black section when
    discovering project root and configuration. Since Black continues to use version
    control as an indicator of project root, this is expected to primarily change behavior
    for users in a monorepo setup (desirably). If you wish to preserve previous behavior,
    simply add an empty [tool.black] to the previously discovered pyproject.toml
    (#​4204)
Output
  • Black will swallow any SyntaxWarnings or DeprecationWarnings produced by the ast
    module when performing equivalence checks (#​4189)
Integrations
  • Add a JSONSchema and provide a validate-pyproject entry-point (#​4181)

v24.1.1

Compare Source

Bugfix release to fix a bug that made Black unusable on certain file systems with strict
limits on path length.

Preview style
  • Consistently add trailing comma on typed parameters (#​4164)
Configuration
  • Shorten the length of the name of the cache file to fix crashes on file systems that
    do not support long paths (#​4176)

v24.1.0

Compare Source

Highlights

This release introduces the new 2024 stable style (#​4106), stabilizing the following
changes:

  • Add parentheses around if-else expressions (#​2278)
  • Dummy class and function implementations consisting only of ... are formatted more
    compactly (#​3796)
  • If an assignment statement is too long, we now prefer splitting on the right-hand side
    ([#​3368](https://redirect.git

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from rclement January 20, 2026 07:53
@renovate

renovate Bot commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock

The current project's Python requirement (>=3.8.1,<4.0.0) is not compatible with some of the required packages Python requirement:
  - black requires Python >=3.10, so it will not be satisfied for Python >=3.8.1,<3.10

Because sqlite-ml depends on black (26.10.1) which requires Python >=3.10, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For black, a possible solution would be to set the `python` property to ">=3.10,<4.0.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

@renovate
renovate Bot force-pushed the renovate/black-26.x branch 2 times, most recently from 4464b4a to 76274a8 Compare March 12, 2026 05:49
@renovate
renovate Bot force-pushed the renovate/black-26.x branch 2 times, most recently from f28faa7 to 378df09 Compare May 18, 2026 18:42
@renovate
renovate Bot force-pushed the renovate/black-26.x branch from 378df09 to d15d00d Compare October 4, 2026 20:29
@renovate
renovate Bot force-pushed the renovate/black-26.x branch from d15d00d to 9abecfc Compare October 10, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant