python-docs-samples
python-docs-samples copied to clipboard
chore(deps): update dependency lxml to v6
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| lxml (source, changelog) | ==5.2.1 -> ==6.0.0 |
Release Notes
lxml/lxml (lxml)
v6.0.0
==================
Features added
-
GH#463:
lxml.html.diffis faster and provides structurally better diffs. Original patch by Steven Fernandez. -
GH#405: The factories
ElementandElementTreecan now be used in type hints. -
GH#448: Parsing from
memoryviewand other buffers is supported to allow zero-copy parsing. -
GH#437:
lxml.html.builderwas missing several HTML5 tag names. Patch by Nick Tarleton. -
GH#458:
CDATAcan now be written into the incrementalxmlfile()writer. Original patch by Lane Shaw. -
A new parser option
decompress=Falsewas added that controls the automatic input decompression when using libxml2 2.15.0 or later. Disabling this option by default will effectively prevent decompression bombs when handling untrusted input. Code that depends on automatic decompression must enable this option. Note that libxml2 2.15.0 was not released yet, so this option currently has no effect but can already be used. -
The set of compile time / runtime supported libxml2 feature names is available as
etree.LIBXML_COMPILED_FEATURESandetree.LIBXML_FEATURES. This currently includescatalog,ftp,html,http,iconv,icu,lzma,regexp,schematron,xmlschema,xpath,zlib.
Bugs fixed
-
GH#353: Predicates in
.find*()could mishandle tag indices if a default namespace is provided. Original patch by Luise K. -
GH#272: The
headandbodyproperties oflxml.htmlelements failed if no such element was found. They now returnNoneinstead. Original patch by FVolral. -
Tag names provided by code (API, not data) that are longer than
INT_MAXcould be truncated or mishandled in other ways. -
.text_content()onlxml.htmlelements accidentally returned a "smart string" without additional information. It now returns a plain string. -
LP#2109931: When building lxml with coverage reporting, it now disables the
sys.monitoringsupport due to the lack of support ihttps://github.com/nedbat/coveragepy/issues/179090
Other changes
-
Support for Python < 3.8 was removed.
-
Parsing directly from zlib (or lzma) compressed data is now considered an optional feature in lxml. It may get removed from libxml2 at some point for security reasons (compression bombs) and is therefore no longer guaranteed to be available in lxml.
As of this release, zlib support is still normally available in the binary wheels but may get disabled or removed in later (x.y.0) releases. To test the availability, use
"zlib" in etree.LIBXML_FEATURES. -
The
Schematronclass is deprecated and will become non-functional in a future lxml version. The feature will soon be removed from libxml2 and stop being available. -
GH#438: Wheels include the
arm7ltarget. -
GH#465: Windows wheels include the
arm64target. Patch by Finn Womack. -
Binary wheels use the library versions libxml2 2.14.4 and libxslt 1.1.43. Note that this disables direct HTTP and FTP support for parsing from URLs. Use Python URL request tools instead (which usually also support HTTPS). To test the availability, use
"http" in etree.LIBXML_FEATURES. -
Windows binary wheels use the library versions libxml2 2.11.9, libxslt 1.1.39 and libiconv 1.17. They are now based on VS-2022.
-
Built using Cython 3.1.2.
-
The debug methods
MemDebug.dump()andMemDebug.show()were removed completely. libxml2 2.13.0 discarded this feature.
v5.4.0
==================
Bugs fixed
- LP#2107279: Binary wheels use libxml2 2.13.8 and libxslt 1.1.43 to resolve several CVEs. (Binary wheels for Windows continue to use a patched libxml2 2.11.9 and libxslt 1.1.39.) Issue found by Anatoly Katyushin.
v5.3.2
==================
This release resolves CVE-2025-24928 as described in https://gitlab.gnome.org/GNOME/libxml2/-/issues/847
Bugs fixed
-
Binary wheels use libxml2 2.12.10 and libxslt 1.1.42.
-
Binary wheels for Windows use a patched libxml2 2.11.9 and libxslt 1.1.39.
v5.3.1
==================
Bugs fixed
-
GH#440: Some tests were adapted for libxml2 2.14.0. Patch by Nick Wellnhofer.
-
LP#2097175:
DTD(external_id="…")erroneously required a byte string as ID value. -
GH#450:
iterparse()internally triggered the `DeprecationWarning`` added in lxml 5.3.0 when parsing HTML.
Other changes
- GH#442: Binary wheels for macOS no longer use the linker flag
-flat_namespace.
v5.3.0
==================
Features added
- GH#421: Nested
CDATAsections 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()andxmlfile.write(). -
LP#2058177: The ISO-Schematron implementation could fail on unknown prefixes. Patch by David Lakin.
Other changes
-
LP#2067707: The
strip_cdataoption inHTMLParser()turned out to be useless and is now deprecated. -
Binary wheels use the library versions libxml2 2.12.9 and libxslt 1.1.42.
-
Windows binary wheels use the library versions libxml2 2.11.8 and libxslt 1.1.39.
-
Built with Cython 3.0.11.
v5.2.2
==================
Bugs fixed
-
GH#417: The
test_feed_parsertest could fail iflxml_html_cleanwas 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.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.