---
title: "black 26.10.1 Breaking Changes on PyPI | Since.dev"
description: "What each black release removed, renamed or changed: 177 breaking changes in 11 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/black
last_updated: 2026-12-04
---

# black breaking changes

black 26.10.1 (October 10, 2026) is its newest release with breaking changes, 17 of them. The first: Removed black.linegen.LineGenerator.visit_paramspec. Every breaking API change we have recorded in black on PyPI: 177 breaking changes in 11 versions. Below, its 11 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `26.10.1`, released October 10, 2026. [Source repository](https://github.com/psf/black)

Its 22.1.0 release drops Python 2. [Python end of life dates](https://since.dev/calendar/python.md).

- From [25.1.0](#v-25-1-0) to [26.10.1](#v-26-10-1): 75 breaking changes in 3 versions.
- From [22.1.0](#v-22-1-0) to [26.10.1](#v-26-10-1): 165 breaking changes in 6 versions.

## black 26.10.1 breaking changes

black 26.10.1, released October 10, 2026: 17 breaking changes.

- **Removed** `black.linegen.LineGenerator.visit_paramspec`  

LineGenerator.visit_paramspec was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Removed** `black.linegen.LineGenerator.visit_typeparams`  

LineGenerator.visit_typeparams was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Removed** `black.linegen.LineGenerator.visit_typevartuple`  

LineGenerator.visit_typevartuple was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Removed** `black.LineGenerator.visit_paramspec`  

LineGenerator.visit_paramspec was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Removed** `black.LineGenerator.visit_typeparams`  

LineGenerator.visit_typeparams was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Removed** `black.LineGenerator.visit_typevartuple`  

LineGenerator.visit_typevartuple was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Removed** `black.nodes.CACHE_DIR`  

black.nodes.CACHE_DIR was removed in black 26.10.1 [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Behavior changed** `tool.black.required-version`  

The Black GitHub Action only accepts released Black versions in tool.black.required-version and now rejects other values such as URL references. Users with such values must change them to a released version. [github.com](https://github.com/psf/black/releases/tag/26.10.1)
- **Signature changed** `black.cache.Cache.read`  

Was @classmethod def read(cls, mode: Mode) -> Self; now @classmethod def read(cls, mode: Mode, cache_dir: Path = CACHE_DIR) -> Self. [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.cache.get_cache_dir`  

Was def get_cache_dir() -> Path; now def get_cache_dir(cache_dir: Path | None = None) -> Path. [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.cache.get_cache_file`  

Was def get_cache_file(mode: Mode) -> Path; now def get_cache_file(mode: Mode, cache_dir: Path) -> Path. [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.Cache.read`  

Was @classmethod def read(cls, mode: Mode) -> Self; now @classmethod def read(cls, mode: Mode, cache_dir: Path = CACHE_DIR) -> Self. [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.concurrency.reformat_many`  

Was def reformat_many(sources: set\[Path\], fast: bool, write_back: WriteBack, mode: Mode, report: Report, workers: int | None, no_cache: bool = False) -> None; now def reformat_many(sources: set\[Path\], fast: bool, write_back: WriteBack... [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.concurrency.schedule_formatting`  

Was async def schedule_formatting(sources: set\[Path\], fast: bool, write_back: WriteBack, mode: Mode, report: Report, loop: asyncio.AbstractEventLoop, executor: Executor, no_cache: bool = False) -> None; now async def... [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.main`  

Was def main(ctx: click.Context, code: str | None, line_length: int, target_version: list\[TargetVersion\], check: bool, diff: bool, line_ranges: Sequence\[str\], color: bool, fast: bool, pyi: bool, ipynb: bool, python_cell_magics... [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `black.reformat_one`  

Was def reformat_one(src: Path, fast: bool, write_back: WriteBack, mode: Mode, report: Report, \*, lines: Collection\[tuple\[int, int\]\] = (), no_cache: bool = False) -> None; now def reformat_one(src: Path, fast: bool, write_back: WriteBack... [pypi.org](https://pypi.org/project/black/26.10.1/)
- **Signature changed** `blib2to3.pygram.initialize`  

Was def initialize(cache_dir: Union\[str, os.PathLike\[str\], None\] = None) -> None; now def initialize(cache_dir: Union\[str, os.PathLike\[str\], None\] = None, \*, save: bool = True) -> None. [pypi.org](https://pypi.org/project/black/26.10.1/)

## black 26.10.0 breaking changes

black 26.10.0, released October 4, 2026: 33 breaking changes.

- **Removed** `black.nodes.RARROW`  

black.nodes.RARROW was removed in black 26.10.0 [pypi.org](https://pypi.org/project/black/26.10.0/)
- **Removed** `migrate-black`  

The migrate-black script is removed. Stop calling it; no replacement is named. [github.com](https://github.com/psf/black/releases/tag/26.10.0)
- **Behavior changed**  

A t-string as the first statement of a module, class or function is no longer treated as a docstring. Code relying on it as a docstring will change. [github.com](https://github.com/psf/black/releases/tag/26.10.0)
- **Behavior changed**  

Parser failures are now reported as path:line:column locations, so tools parsing the old error output may need updating. [github.com](https://github.com/psf/black/releases/tag/26.10.0)
- **Behavior changed**  

Form feeds and similar characters in docstrings are kept rather than converted to newlines. [github.com](https://github.com/psf/black/releases/tag/26.10.0)
- **Configuration changed** `tool.black.force-exclude`  

Non-string force-exclude values in pyproject.toml are now rejected. Make sure the force-exclude value is a string. [github.com](https://github.com/psf/black/releases/tag/26.10.0)
- **Configuration changed** `tool.black.include`  

Non-string include values in pyproject.toml are now rejected. Make sure the include value is a string. [github.com](https://github.com/psf/black/releases/tag/26.10.0)
- **Signature changed** `black.comments.convert_one_fmt_off_pair`  

Was def convert_one_fmt_off_pair(node: Node, mode: Mode, lines: Collection\[tuple\[int, int\]\]) -> bool; now def convert_one_fmt_off_pair(node: Node, leaves: list\[Leaf\], start: int, mode: Mode, lines: Collection\[tuple\[int, int\]\]... [pypi.org](https://pypi.org/project/black/26.10.0/)
- **Signature changed** `black.comments.generate_comments`  

Was def generate_comments(leaf: LN, mode: Mode) -> Iterator\[Leaf\]; now def generate_comments(leaf: LN, mode: Mode, \*, preserve_comment_formatting: bool = False, line_ranges_first_lineno: int = 0, line_ranges_selected: set\[int\] | None =... [pypi.org](https://pypi.org/project/black/26.10.0/)
- **Signature changed** `black.comments.ProtoComment.__init__`  

Was def \_\_init\_\_(self, type: int, value: str, newlines: int, consumed: int, form_feed: bool, leading_whitespace: str) -> None; now def \_\_init\_\_(self, type: int, value: str, newlines: int, consumed: int, form_feed: bool, leading_whitespace... [pypi.org](https://pypi.org/project/black/26.10.0/)

And 23 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## black 26.1.0 breaking changes

black 26.1.0, released January 18, 2026: 25 breaking changes.

- **Removed** `black.comments.Preview`  

black.comments.Preview was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.lines.Preview`  

black.lines.Preview was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.nodes.Preview`  

black.nodes.Preview was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.always_one_newline_after_import`  

Preview.always_one_newline_after_import was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.fix_fmt_skip_in_one_liners`  

Preview.fix_fmt_skip_in_one_liners was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.fix_module_docstring_detection`  

Preview.fix_module_docstring_detection was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.fix_type_expansion_split`  

Preview.fix_type_expansion_split was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.multiline_string_handling`  

Preview.multiline_string_handling was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.normalize_cr_newlines`  

Preview.normalize_cr_newlines was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)
- **Removed** `black.Preview.remove_parens_around_except_types`  

Preview.remove_parens_around_except_types was removed in black 26.1.0 [pypi.org](https://pypi.org/project/black/26.1.0/)

And 15 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## black 25.1.0 breaking changes

black 25.1.0, released January 29, 2025: 23 breaking changes.

- **Removed** `black.comments.Preview`  

black.comments.Preview was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.handle_ipynb_magics.TOKEN_HEX`  

black.handle_ipynb_magics.TOKEN_HEX was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.nodes.Preview`  

black.nodes.Preview was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.docstring_check_for_newline`  

Preview.docstring_check_for_newline was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.hex_codes_in_unicode_sequences`  

Preview.hex_codes_in_unicode_sequences was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.is_simple_lookup_for_doublestar_expression`  

Preview.is_simple_lookup_for_doublestar_expression was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.no_normalize_fmt_skip_whitespace`  

Preview.no_normalize_fmt_skip_whitespace was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.parens_for_long_if_clauses_in_case_block`  

Preview.parens_for_long_if_clauses_in_case_block was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.pep646_typed_star_arg_type_var_tuple`  

Preview.pep646_typed_star_arg_type_var_tuple was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)
- **Removed** `black.Preview.remove_redundant_guard_parens`  

Preview.remove_redundant_guard_parens was removed in black 25.1.0 [pypi.org](https://pypi.org/project/black/25.1.0/)

And 13 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## black 24.1.0 breaking changes

black 24.1.0, released January 26, 2024: 40 breaking changes.

- **Removed** `--experimental-string-processing`  

The flag is gone. Use --preview with --enable-unstable-feature string_processing instead. [github.com](https://github.com/psf/black/releases/tag/24.1.0)
- **Removed** `black.comments.Preview.accept_raw_docstrings`  

Preview.accept_raw_docstrings was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.add_trailing_comma_consistently`  

Preview.add_trailing_comma_consistently was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.allow_empty_first_line_in_block`  

Preview.allow_empty_first_line_in_block was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.allow_form_feeds`  

Preview.allow_form_feeds was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.blank_line_after_nested_stub_class`  

Preview.blank_line_after_nested_stub_class was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.blank_line_between_nested_and_def_stub_file`  

Preview.blank_line_between_nested_and_def_stub_file was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.dummy_implementations`  

Preview.dummy_implementations was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.fix_power_op_line_length`  

Preview.fix_power_op_line_length was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)
- **Removed** `black.comments.Preview.improved_async_statements_handling`  

Preview.improved_async_statements_handling was removed in black 24.1.0 [pypi.org](https://pypi.org/project/black/24.1.0/)

And 30 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## black 23.1.0 breaking changes

black 23.1.0, released February 1, 2023: 27 breaking changes.

- **Removed** `black.linegen.Preview.annotation_parens`  

Preview.annotation_parens was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.empty_lines_before_class_or_def_with_leading_comments`  

Preview.empty_lines_before_class_or_def_with_leading_comments was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.handle_trailing_commas_in_head`  

Preview.handle_trailing_commas_in_head was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.long_docstring_quotes_on_newline`  

Preview.long_docstring_quotes_on_newline was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.normalize_docstring_quotes_and_prefixes_properly`  

Preview.normalize_docstring_quotes_and_prefixes_properly was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.one_element_subscript`  

Preview.one_element_subscript was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.remove_block_trailing_newline`  

Preview.remove_block_trailing_newline was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.linegen.Preview.remove_redundant_parens`  

Preview.remove_redundant_parens was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.lines.Preview`  

black.lines.Preview was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)
- **Removed** `black.trans.BracketMatchError`  

black.trans.BracketMatchError was removed in black 23.1.0 [pypi.org](https://pypi.org/project/black/23.1.0/)

And 17 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Older versions

5 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### black 22.1.0 breaking changes

black 22.1.0, released January 29, 2022: 6 breaking changes.

- **Removed**  

Black no longer supports running on or formatting for Python 2. Users still on Python 2 must stay on an earlier release. [github.com](https://github.com/psf/black/releases/tag/22.1.0)
- **Behavior changed**  

Formatting now rewrites string prefixes into a normalized order, changing output for existing code. [github.com](https://github.com/psf/black/releases/tag/22.1.0)

And 4 more in this version.

### black 21.5b2 breaking changes

black 21.5b2, released January 29, 2022: 1 breaking change.

- **Behavior changed**  

Formatting no longer inserts a space into empty docstrings, so output for those files changes. [github.com](https://github.com/psf/black/releases/tag/21.5b2)

### black 20.8b1 breaking changes

black 20.8b1, released January 29, 2022: 1 breaking change.

- **Configuration changed**  

Black no longer works with Click versions older than 7.0; install Click 7.1.2 or newer. [github.com](https://github.com/psf/black/blob/22.1.0/CHANGES.md)

### black 20.8b0 breaking changes

black 20.8b0, released January 29, 2022: 3 breaking changes.

- **Removed** `--py36`  

The deprecated --py36 option is removed; use --target-version instead. [github.com](https://github.com/psf/black/blob/22.1.0/CHANGES.md)
- **Behavior changed**  

Black now exits with code 2 when a specified configuration file does not exist. [github.com](https://github.com/psf/black/blob/22.1.0/CHANGES.md)

And 1 more in this version.

### black 18.3a4 breaking changes

black 18.3a4, released January 29, 2022: 1 breaking change.

- **Behavior changed** `--check`  

Black stopped returning exit code 1 for ordinary runs; only --check triggers it. Scripts relying on the old exit code must change. [github.com](https://github.com/psf/black/blob/22.1.0/CHANGES.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
