lxml breaking changes
lxml 6.2.0 (November 27, 2026) is its newest release with breaking changes, 2 of them. The first: DTD comments and processing instructions are no longer reported to parser targets in lxml 6.2.0. Every breaking API change we have recorded in lxml on PyPI: 31 breaking changes in 9 versions. Below, its 9 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 6.2.1, released November 29, 2026. Source repository
Its 6.0.0 release requires Python 3.8 or later. Python end of life dates.
- From 5.4.0 to 6.2.0: 11 breaking changes in 4 versions.
- From 4.0.0 to 6.2.0: 23 breaking changes in 8 versions.
lxml 6.2.0 breaking changes
- Behavior changed
Comments and processing instructions from the internal or external DTD subsets are no longer passed through the SAX/target-parser and iterparse/pull parser interfaces. Code that relied on receiving them must be updated. github.com - Behavior changed
lxml.html.htmldiff
Links in the output of htmldiff() are now escaped, so markup that previously passed through unescaped will appear differently. Code that depends on the raw link markup must be checked. github.com
lxml 6.1.3 breaking changes
- Behavior changed
External parameter entity parsing was previously allowed by default with resolve_entities set to internal; it is now disabled, so code that relied on it must opt in again. github.com
lxml 6.1.0 breaking changes
- Default changed
ETCompatXMLParser
The resolve_entities default for ETCompatXMLParser changed from True to 'internal', so external entities are no longer resolved unless you set the option explicitly. github.com - Default changed
iterparse
The resolve_entities default for iterparse() changed from True to 'internal', so external entities are no longer resolved unless you set the option explicitly. github.com
lxml 6.0.0 breaking changes
- Removed
Python versions below 3.8 are no longer supported, so code running on them will not work with lxml 6.0.0. github.com - Removed
MemDebug.dump
MemDebug.dump() and MemDebug.show() were removed completely, so code calling them will fail. github.com - Removed
MemDebug.show
MemDebug.dump() and MemDebug.show() were removed completely, so code calling them will fail. github.com - Behavior changed
Parsing directly from zlib or lzma compressed data is no longer guaranteed and may be disabled in later x.y.0 releases. Check etree.LIBXML_FEATURES before relying on it. github.com - Behavior changed
Wheels now use libxml2 2.14.4, which disables direct HTTP and FTP support for parsing from URLs. Use Python URL request tools instead. github.com - Behavior changed
lxml.html.text_content
Code relying on the extra information of the smart string returned by text_content() on lxml.html elements will see a plain string. github.com
lxml 5.4.0 breaking changes
- Behavior changed
Binary wheels now use libxml2 2.13.8 and libxslt 1.1.43 instead of earlier bundled versions; Windows wheels keep the older patched libxml2 2.11.9 and libxslt 1.1.39. github.com
lxml 5.3.2 breaking changes
- Behavior changed
Binary wheels now bundle libxml2 2.12.10 and libxslt 1.1.42, and Windows wheels use a patched libxml2 2.11.9 and libxslt 1.1.39. Users relying on the bundled libraries may see parser behavior changes. github.com
Older versions
3 older versions, each with its first changes. Sign up to see every change
Show 3 older versions
lxml 5.3.1 breaking changes
- Behavior changed
macOS binary wheels are now built without the -flat_namespace linker flag; this is a packaging change that does not alter how existing code runs. github.com
lxml 5.0.0 breaking changes
- Removed
parser.setElementClassLookup
parser.setElementClassLookup() has been removed. Code that calls it will fail and must be changed. github.com - Removed
xpath.evaluate
xpath.evaluate() has been removed. Code that calls it will fail and must be changed. github.com
And 7 more in this version.
lxml 4.0.0 breaking changes
- Renamed
The main module source files were renamed, for example etree.pyx instead of lxml.etree.pyx. Third-party code compiling against the C-API should verify it still works. github.com - Behavior changed
The html5parser no longer enables the useChardet option when the input is a Unicode string unless requested. Code parsing byte strings that depends on character detection should pass guess_charset=True explicitly. github.com
And 6 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.