8000 Tags · lxml/lxml · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

lxml-6.2.1

Toggle lxml-6.2.1's commit message
6.2.1 (2026-11-29)

==================

This release fixes regressions in lxml 6.2.0 and covers more edge cases for its security fixes.
Upgrading is recommended.

Bugs fixed
----------

* GH#620: Pull parsers with a parser target failed on comments and processing instructions
  when collecting ``comment`` or ``pi`` events since lxml 6.2.0.
  Patch by Pierre-Yves Le Borgne.

* LP#2178248: The parser target's ``.start()`` callback method stopped receiving a namespace
  mapping dict in lxml 6.2.0 if no ``.end_ns()`` method was also provided.

* GHSA-59qx-3jjv-x996, GH#619: The fix in lxml 6.2.0 did not work with libxml2 < 2.13, which parses entities
  in a separate parser context.  ``iterparse()`` and ``XMLPullParser`` could still crash with it
  on entities that fail to parse, but also on comments and PIs in entities and on entities
  that are referenced more than once.
  Patch by Pierre-Yves Le Borgne.

* GHSA-59qx-3jjv-x996, GH#619: The fix in lxml 6.2.0 did not cover parsers with ``resolve_entities=False``.
  libxml2 also parses the internal entities that it does not substitute, and ``iterparse()`` and
  ``XMLPullParser`` could still crash on such entities that fail to parse.
  Patch by Pierre-Yves Le Borgne.

* GHSA-59qx-3jjv-x996, GH#619: An ``XMLPullParser`` that was fed again after a parse error reported
  left-over events of the failed document, which could refer to elements that were already freed.
  Patch by Pierre-Yves Le Borgne.

* LP#2178276: The sdist was missing from the Github release upload.

lxml-6.2.0

Toggle lxml-6.2.0's commit message
6.2.0 (2026-11-27)

==================

This release contains several security fixes. Upgrading is recommended.

Bugs fixed
----------

* GHSA-23p9-v872-36p9: Passing ``CDATA()`` wrapped content ending with a bare ``]`` character
  into an ``xmlfile`` reads arbitrary data from the Python heap and includes it in the generated XML document.
  This allows reading random content from the application memory and/or crashing the application.
  Issue found by shaggitza.

* GHSA-59qx-3jjv-x996: Parsing a document defining a non-wellformed entity with the default configuration
  of ``iterparse()`` could crash the application.
  This issue is network exploitable if the application parses untrusted documents from remote sites.
  Issue found by Claude and Ada Logics.

* GHSA-27mw-m39x-fm32: Comments and PIs from the internal/external DTD subsets were reported
  through the SAX/target-parser and iterparse/pull parser interfaces which could lead to internal
  memory corruption and crashes.  They are no longer reported.
  Issue found by Claude and Ada Logics.

* GH#550: The output of ``htmldiff()`` could contain unescaped links, allowing for content injection.
  Patch by Nayana-Naik73.

* LP#2011542: A processing instruction after the root element crashed ``lxml.sax.ElementTreeContentHandler``
  with ``IndexError``.  It is now kept as following sibling.
  Patch by cherith.

* LP#2175761: Resolvers that returned a string with a ``base_url`` leaked a copy of the URL with
  libxml2 2.14 and later.
  Patch by Pierre-Yves Le Borgne.

* GH#546: ``lxml.html.diff`` is a bit more stable on PyPy.
  Patch by Matti Picus.

* The souppoarser did not immediately close the file after parsing if it opened it.

* The parallel ``make`` execution during library build could fail
  when it tries to request more CPUs than available.

* LP#2175761: The C code that Cython generates for ``lxml.etree`` no longer depends on ``PYTHONHASHSEED``.
  The exact C types that Cython inferred for some untyped variables was not deterministic.
  It is now statically declared.
  Patch by Pierre-Yves Le Borgne.

Other changes
-------------

* The binary wheels include several security relevant bug fixes for libxml2 on all platforms.

  https://github.com/lxml/lxml/blob/lxml-6.2.0/libxml2-2.14.6-backport1.patch
  https://github.com/lxml/lxml/blob/lxml-6.2.0/libxslt-1.1.43-backport1.patch
  https://github.com/lxml/libxml2-win-binaries/releases/tag/2026.11.23

* Built with Cython 3.3.2.
  Wheels for Python 3.8/3.9 use Cython 3.2.9.

lxml-6.1.3

Toggle lxml-6.1.3's commit message
6.1.3 (2026-09-02)

==================

Bugs fixed
----------

* LP#2165901: External parameter entity parsing was allowed by default
  (with ``resolve_entities="internal"``).
  Issue found by Tomer Fichman.

lxml-6.1.3-1

Toggle lxml-6.1.3-1's commit message
6.1.3 (2026-09-02)

==================

Bugs fixed
----------

* LP#2165901: External parameter entity parsing was allowed by default
  (with ``resolve_entities="internal"``).
  Issue found by Tomer Fichman.

lxml-7.0.0b1

Toggle lxml-7.0.0b1's commit message
7.0.0b1 (2026-08-22)

====================

Bugs fixed
----------

* LP#2143321: A ``NameError`` in ``doctestcompare`` when the doctests are processed
  by a non-standard module.
  Original patch by Rahul Kumar.

* GH#492: Failures in ``htmldiff()`` to string-join the diff result are now propagated
  instead of silently returning an empty result.
  Patch by Juan Carlos Carvajal B.

Other changes
-------------

* Built using Cython 3.3.0.

lxml-7.0.0b1-1

Toggle lxml-7.0.0b1-1's commit message
7.0.0b1 (2026-08-22)

====================

Bugs fixed
----------

* LP#2143321: A ``NameError`` in ``doctestcompare`` when the doctests are processed
  by a non-standard module.
  Original patch by Rahul Kumar.

* GH#492: Failures in ``htmldiff()`` to string-join the diff result are now propagated
  instead of silently returning an empty result.
  Patch by Juan Carlos Carvajal B.

Other changes
-------------

* Built using Cython 3.3.0.

lxml-6.1.2

Toggle lxml-6.1.2's commit message
6.1.2 (2026-08-18)

==================

Bugs fixed
----------

* GH#526: Some build files were missing in the sdist.
  Patch by Nicola Soranzo.

* Some minor corrections for error handling cases.

Other changes
-------------

* Built with Cython 3.2.9.

lxml-6.1.2-1

Toggle lxml-6.1.2-1's commit message
6.1.2 (2026-08-18)

==================

Bugs fixed
----------

* GH#526: Some build files were missing in the sdist.
  Patch by Nicola Soranzo.

* Some minor corrections for error handling cases.

Other changes
-------------

* Built with Cython 3.2.9.

lxml-7.0.0a3

Toggle lxml-7.0.0a3's commit message
7.0.0a3 (2026-06-16)

====================

Features added
--------------

* ``.find()`` and ``.findall()`` now take advantage of their read-locked tree
  to skip tree modification checks, making them visibly faster.

* Python Element proxy instantiation was tuned another bit to shave off more of the
  performance disadvantages added by tree locking.

* The path compilation cache used by ElementPath uses an LRU eviction scheme.
  It previously just cleared the whole cache when overflowing.

Bugs fixed
----------

* Attribute iteration now remembers a safe integer index instead of a tree attribute pointer
  that is potentially subject of user side modifications.  This may make attribute iteration
  slightly slower for long sequences of attributes but allows for attribute manipulation
  between iteration steps, giving similar iteration+manipulation semantics as Python lists.

* Several issues (race conditions, memory leaks on error handling, crashes)
  were found via an automated review and subsequently resolved.
  Review contributed by devdanzin.

lxml-7.0.0a2

Toggle lxml-7.0.0a2's commit message
7.0.0a2 (2026-06-09)

====================

Features added
--------------

* GH#511: The ElementPath implementation (``.find()`` etc) was rewritten based on
  native traversal of the libxml2 tree instead of passing through Element proxy
  objects.  This makes some path operations like child steps or predicate evaluation
  several times faster.  Indexing can be more than 100x faster.

  Note that some operations are also slower due to the new lock usages in lxml 7.0.
  Usually, the more selective the path, the faster it runs.

  Original idea and implementation by mahomaho.
0