- Update to 6.0.0:
* ``lxml.html.diff`` is faster and provides structurally better diffs.
* The factories ``Element`` and ``ElementTree`` can now be used in type
hints.
* Parsing from ``memoryview`` and other buffers is supported to allow
zero-copy parsing.
* ``lxml.html.builder`` was missing several HTML5 tag names.
* ``CDATA`` can now be written into the incremental ``xmlfile()`` writer.
* A new parser option ``decompress=False`` was added that controls the
automatic input decompression when using libxml2 2.15.0 or later.
* The set of compile time / runtime supported libxml2 feature names is
available as ``etree.LIBXML_COMPILED_FEATURES`` and
``etree.LIBXML_FEATURES``.
* Predicates in ``.find*()`` could mishandle tag indices if a default
namespace is provided.
* The ``head`` and ``body`` properties of ``lxml.html`` elements failed
if no such element was found. They now return ``None`` instead.
* Tag names provided by code (API, not data) that are longer than
``INT_MAX`` could be truncated or mishandled in other ways.
* ``.text_content()`` on ``lxml.html`` elements accidentally returned
a "smart string" without additional information. It now returns a plain
string.
* Support for Python < 3.8 was removed.
* Parsing directly from zlib (or lzma) compressed data is now considered
an optional feature in lxml.
* The ``Schematron`` class is deprecated and will become non-functional in
a future lxml version.
* Built using Cython 3.1.2.
* The debug methods ``MemDebug.dump()`` and ``MemDebug.show()`` were
removed completely.
OBS-URL: https://build.opensuse.org/request/show/1294982
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lxml?expand=0&rev=114
* ``lxml.html.diff`` is faster and provides structurally better diffs.
* The factories ``Element`` and ``ElementTree`` can now be used in type
hints.
* Parsing from ``memoryview`` and other buffers is supported to allow
zero-copy parsing.
* ``lxml.html.builder`` was missing several HTML5 tag names.
* ``CDATA`` can now be written into the incremental ``xmlfile()`` writer.
* A new parser option ``decompress=False`` was added that controls the
automatic input decompression when using libxml2 2.15.0 or later.
* The set of compile time / runtime supported libxml2 feature names is
available as ``etree.LIBXML_COMPILED_FEATURES`` and
``etree.LIBXML_FEATURES``.
* Predicates in ``.find*()`` could mishandle tag indices if a default
namespace is provided.
* The ``head`` and ``body`` properties of ``lxml.html`` elements failed
if no such element was found. They now return ``None`` instead.
* Tag names provided by code (API, not data) that are longer than
``INT_MAX`` could be truncated or mishandled in other ways.
* ``.text_content()`` on ``lxml.html`` elements accidentally returned
a "smart string" without additional information. It now returns a plain
string.
* Support for Python < 3.8 was removed.
* Parsing directly from zlib (or lzma) compressed data is now considered
an optional feature in lxml.
* The ``Schematron`` class is deprecated and will become non-functional in
a future lxml version.
* Built using Cython 3.1.2.
* The debug methods ``MemDebug.dump()`` and ``MemDebug.show()`` were
removed completely.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=209
- 5.3.0 (2024-08-10)
Features added
- GH#421: Nested CDATA sections are no longer rejected but split
on output to represent ]]> correctly. Patch by Gertjan Klein.
Bugs fixed
- LP#2060160: Attribute values serialised differently in
xmlfile.element() and xmlfile.write().
- LP#2058177: The ISO-Schematron implementation could fail on
unknown prefixes. Patch by David Lakin.
Other changes
- LP#2067707: The strip_cdata option in HTMLParser() turned out
to be useless and is now deprecated.
- Built with Cython 3.0.11.
OBS-URL: https://build.opensuse.org/request/show/1203593
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=202
- Remove not needed patch skip-test-under-libexpat-2.6.0.patch
- Update to 5.2.2:
- GH#417: The test_feed_parser test could fail if lxml_html_clean
was not installed. It is now skipped in that case.
- LP#2059910: The minimum CPU architecture for the Linux x86 binary
wheels was set back to "core2", without SSE 4.2.
- If libxml2 uses iconv, the compile time version is available as
etree.ICONV_COMPILED_VERSION.
- 5.2.1
- LP#2059910: The minimum CPU architecture for the Linux x86 binary
wheels was set back to "core2", but with SSE 4.2 enabled.
- LP#2059977: ``Element.iterfind("//absolute_path")`` failed with a
``SyntaxError`` where it should have issued a warning.
- GH#416: The documentation build was using the non-standard
``which`` command. Patch by Michał Górny.
- 5.2.0
- LP#1958539: The ``lxml.html.clean`` implementation suffered from
several (only if used) security issues in the past and was now
extracted into a separate library:
https://github.com/fedora-python/lxml_html_clean
Projects that use lxml without "lxml.html.clean" will not notice
any difference, except that they won't have potentially vulnerable
code installed. The module is available as an "extra" setuptools
dependency "lxml[html_clean]", so that Projects that need
"lxml.html.clean" will need to switch their requirements from
"lxml" to "lxml[html_clean]", or install the new library
themselves.
- The minimum CPU architecture for the Linux x86 binary wheels was
upgraded to "sandybridge" (launched 2011), and glibc 2.28 / gcc 12
(manylinux_2_28) wheels were added.
OBS-URL: https://build.opensuse.org/request/show/1180847
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lxml?expand=0&rev=110
- Update to 5.2.2:
- GH#417: The test_feed_parser test could fail if lxml_html_clean
was not installed. It is now skipped in that case.
- LP#2059910: The minimum CPU architecture for the Linux x86 binary
wheels was set back to "core2", without SSE 4.2.
- If libxml2 uses iconv, the compile time version is available as
etree.ICONV_COMPILED_VERSION.
- 5.2.1
- LP#2059910: The minimum CPU architecture for the Linux x86 binary
wheels was set back to "core2", but with SSE 4.2 enabled.
- LP#2059977: ``Element.iterfind("//absolute_path")`` failed with a
``SyntaxError`` where it should have issued a warning.
- GH#416: The documentation build was using the non-standard
``which`` command. Patch by Michał Górny.
- 5.2.0
- LP#1958539: The ``lxml.html.clean`` implementation suffered from
several (only if used) security issues in the past and was now
extracted into a separate library:
https://github.com/fedora-python/lxml_html_clean
Projects that use lxml without "lxml.html.clean" will not notice
any difference, except that they won't have potentially vulnerable
code installed. The module is available as an "extra" setuptools
dependency "lxml[html_clean]", so that Projects that need
"lxml.html.clean" will need to switch their requirements from
"lxml" to "lxml[html_clean]", or install the new library
themselves.
- The minimum CPU architecture for the Linux x86 binary wheels was
upgraded to "sandybridge" (launched 2011), and glibc 2.28 / gcc 12
(manylinux_2_28) wheels were added.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=200
- update to 4.9.4:
* LP#2046398: Inserting/replacing an ancestor into a node's
children could loop indefinitely.
* LP#1980767, GH#379: ``TreeBuilder.close()`` could fail with a
``TypeError`` after parsing incorrect input.
* LP#1522052: A file-system specific test is now optional and
should no longer fail on systems that don't support it.
* Built with Cython 0.29.37.
- drop libxml2212-tests.patch (upstream)
- remove python 2.x from testing
- allow building against any libxml2 version in sle15
* Built with Cython 0.29.28.
* LP#1835708: ElementInclude incorrectly rejected repeated
* LP#1755825: iterwalk() failed to return the 'start' event for the initial
- ElementTree.write() has a new option doctype that writes out
a doctype string before the serialisation, in the same way as
- GH#220: xmlfile allows switching output methods at an element
- LP#1595781, GH#240: added a PyCapsule Python API and C-level
API for passing externally generated libxml2 documents into
- GH#244: error log entries have a new property path with an
XPath expression (if known, None otherwise) that points to the
- The namespace prefix mapping that can be used in ElementPath
- GH#238: Character escapes were not hex-encoded in the xmlfile
- GH#229: fix for externally created XML documents.
strips the option values specified in form attributes but only
- LP#1551797: revert previous fix for XSLT error logging as it
- LP#1673355, GH#233: fromstring() html5parser failed to parse
- The previously undocumented docstring option in
ElementTree.write() produces a deprecation warning and will
OBS-URL: https://build.opensuse.org/request/show/1134342
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lxml?expand=0&rev=106
* LP#2046398: Inserting/replacing an ancestor into a node's
children could loop indefinitely.
* LP#1980767, GH#379: ``TreeBuilder.close()`` could fail with a
``TypeError`` after parsing incorrect input.
* LP#1522052: A file-system specific test is now optional and
should no longer fail on systems that don't support it.
* Built with Cython 0.29.37.
- drop libxml2212-tests.patch (upstream)
- remove python 2.x from testing
- allow building against any libxml2 version in sle15
* Built with Cython 0.29.28.
* LP#1835708: ElementInclude incorrectly rejected repeated
* LP#1755825: iterwalk() failed to return the 'start' event for the initial
- ElementTree.write() has a new option doctype that writes out
a doctype string before the serialisation, in the same way as
- GH#220: xmlfile allows switching output methods at an element
- LP#1595781, GH#240: added a PyCapsule Python API and C-level
API for passing externally generated libxml2 documents into
- GH#244: error log entries have a new property path with an
XPath expression (if known, None otherwise) that points to the
- The namespace prefix mapping that can be used in ElementPath
- GH#238: Character escapes were not hex-encoded in the xmlfile
- GH#229: fix for externally created XML documents.
strips the option values specified in form attributes but only
- LP#1551797: revert previous fix for XSLT error logging as it
- LP#1673355, GH#233: fromstring() html5parser failed to parse
- The previously undocumented docstring option in
ElementTree.write() produces a deprecation warning and will
- remove patch lxml-fix-attribute-quoting.patch because it is now
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=191
- update to 4.9.3:
* ``lxml.objectify`` accepted non-decimal numbers like ``²²²``
as integers.
* A memory leak in ``lxml.html.clean`` was resolved by
switching to Cython 0.29.34+.
* GH#348: URL checking in the HTML cleaner was improved.
* GH#371, GH#373: Some regex strings were changed to raw
strings to fix Python warnings.
* Built with Cython 0.29.36 to adapt to changes in Python 3.12.
OBS-URL: https://build.opensuse.org/request/show/1103711
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lxml?expand=0&rev=103
* ``lxml.objectify`` accepted non-decimal numbers like ``²²²``
as integers.
* A memory leak in ``lxml.html.clean`` was resolved by
switching to Cython 0.29.34+.
* GH#348: URL checking in the HTML cleaner was improved.
* GH#371, GH#373: Some regex strings were changed to raw
strings to fix Python warnings.
* Built with Cython 0.29.36 to adapt to changes in Python 3.12.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=185