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

# bleach breaking changes

bleach 6.0.0 (January 23, 2023) is its newest release with breaking changes, 8 of them. The first: Removed bleach.sanitizer.BleachSanitizerFilter.strip_disallowed_elements. Every breaking API change we have recorded in bleach on PyPI: 20 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `6.4.0`, released June 5, 2026. 

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

- From [5.0.0](#v-5-0-0) to [6.0.0](#v-6-0-0): 8 breaking changes in 1 version.

## bleach 6.0.0 breaking changes

bleach 6.0.0, released January 23, 2023: 8 breaking changes.

- **Removed** `bleach.sanitizer.BleachSanitizerFilter.strip_disallowed_elements`  

BleachSanitizerFilter.strip_disallowed_elements was removed in bleach 6.0.0 [pypi.org](https://pypi.org/project/bleach/6.0.0/)
- **Renamed** `bleach.sanitizer.BleachSanitizerFilter.strip_allowed_elements`  

The strip_allowed_elements argument is now named strip_allowed_tags; update callers to use the new name. [github.com](https://github.com/mozilla/bleach/blob/v6.0.0/CHANGES)
- **Configuration changed** `bleach.clean`  

The tags and protocols arguments of bleach.clean must now be sets instead of lists; code passing lists must be updated. [github.com](https://github.com/mozilla/bleach/blob/v6.0.0/CHANGES)
- **Configuration changed** `bleach.html5lib_shim.BleachHTMLParser`  

The tags and protocols arguments of BleachHTMLParser must now be sets instead of lists; code passing lists must be updated. [github.com](https://github.com/mozilla/bleach/blob/v6.0.0/CHANGES)
- **Configuration changed** `bleach.linkifier.Linker`  

The skip_tags and recognized_tags arguments of Linker must now be sets instead of lists; code passing lists must be updated. [github.com](https://github.com/mozilla/bleach/blob/v6.0.0/CHANGES)
- **Configuration changed** `bleach.linkify`  

The skip_tags and recognized_tags arguments of linkify must now be sets instead of lists; code passing lists must be updated. [github.com](https://github.com/mozilla/bleach/blob/v6.0.0/CHANGES)
- **Configuration changed** `bleach.sanitizer.Cleaner`  

The tags and protocols arguments of Cleaner must now be sets instead of lists; code passing lists must be updated. [github.com](https://github.com/mozilla/bleach/blob/v6.0.0/CHANGES)
- **Signature changed** `bleach.sanitizer.BleachSanitizerFilter.__init__`  

Was def \_\_init\_\_(self, source, allowed_elements=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES, allowed_protocols=ALLOWED_PROTOCOLS, strip_disallowed_elements=False, strip_html_comments=True, css_sanitizer=None, \*\*kwargs); now def... [pypi.org](https://pypi.org/project/bleach/6.0.0/)

## bleach 5.0.0 breaking changes

bleach 5.0.0, released April 7, 2022: 12 breaking changes.

- **Removed**  

Python 3.6 is no longer supported; users on Python 3.6 must stay on bleach 4.x or upgrade Python. [github.com](https://github.com/mozilla/bleach/blob/v5.0.0/CHANGES)
- **Removed** `bleach.html5lib_shim.CHARACTERS_TYPE`  

bleach.html5lib_shim.CHARACTERS_TYPE was removed in bleach 5.0.0 [pypi.org](https://pypi.org/project/bleach/5.0.0/)
- **Removed** `bleach.html5lib_shim.PARSEERROR_TYPE`  

bleach.html5lib_shim.PARSEERROR_TYPE was removed in bleach 5.0.0 [pypi.org](https://pypi.org/project/bleach/5.0.0/)
- **Removed** `bleach.linkifier.alphabetize_attributes`  

bleach.linkifier.alphabetize_attributes was removed in bleach 5.0.0 [pypi.org](https://pypi.org/project/bleach/5.0.0/)
- **Removed** `bleach.sanitizer.ALLOWED_STYLES`  

bleach.sanitizer.ALLOWED_STYLES was removed in bleach 5.0.0 [pypi.org](https://pypi.org/project/bleach/5.0.0/)
- **Removed** `bleach.sanitizer.Cleaner.styles`  

Cleaner.styles was removed in bleach 5.0.0 [pypi.org](https://pypi.org/project/bleach/5.0.0/)
- **Removed** `bleach.utils`  

bleach.utils was removed in bleach 5.0.0 [pypi.org](https://pypi.org/project/bleach/5.0.0/)
- **Behavior changed** `clean`  

Attribute order in output from clean and linkify is preserved now, so code relying on the previous ordering may see different output. [github.com](https://github.com/mozilla/bleach/blob/v5.0.0/CHANGES)
- **Configuration changed**  

requirements-dev.in and requirements-dev.txt are gone; development dependencies are now installed through the dev extras. [github.com](https://github.com/mozilla/bleach/blob/v5.0.0/CHANGES)
- **Signature changed** `bleach.clean`  

Was def clean(text, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES, styles=ALLOWED_STYLES, protocols=ALLOWED_PROTOCOLS, strip=False, strip_comments=True); now def clean(text, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES... [pypi.org](https://pypi.org/project/bleach/5.0.0/)

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

## 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.
