- 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 - 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
This commit is contained in:
parent
81aa3f39a0
commit
0d1ac9e9a0
@ -1,41 +0,0 @@
|
|||||||
From 2a6770566ab57d601abc7c2f49a8051b9d97b64c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
|
||||||
Date: Tue, 31 Oct 2023 12:36:02 +0100
|
|
||||||
Subject: [PATCH] Make Unicode recovery test work with libxml2 2.12 (GH-383)
|
|
||||||
|
|
||||||
When encountering encoding errors, libxml2 no longer switches to ISO-8859-1 since version 2.12.
|
|
||||||
---
|
|
||||||
src/lxml/parser.pxi | 2 +-
|
|
||||||
src/lxml/tests/test_unicode.py | 6 +++++-
|
|
||||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lxml/parser.pxi b/src/lxml/parser.pxi
|
|
||||||
index 4b7b52065..8ceec7d25 100644
|
|
||||||
--- a/src/lxml/parser.pxi
|
|
||||||
+++ b/src/lxml/parser.pxi
|
|
||||||
@@ -693,7 +693,7 @@ cdef xmlDoc* _handleParseResult(_ParserContext context,
|
|
||||||
# An encoding error occurred and libxml2 switched from UTF-8
|
|
||||||
# input to (undecoded) Latin-1, at some arbitrary point in the
|
|
||||||
# document. Better raise an error than allowing for a broken
|
|
||||||
- # tree with mixed encodings.
|
|
||||||
+ # tree with mixed encodings. This is fixed in libxml2 2.12.
|
|
||||||
well_formed = 0
|
|
||||||
elif recover or (c_ctxt.wellFormed and
|
|
||||||
c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR):
|
|
||||||
diff --git a/src/lxml/tests/test_unicode.py b/src/lxml/tests/test_unicode.py
|
|
||||||
index 6d4ee9c0f..3636539b2 100644
|
|
||||||
--- a/src/lxml/tests/test_unicode.py
|
|
||||||
+++ b/src/lxml/tests/test_unicode.py
|
|
||||||
@@ -167,7 +167,11 @@ def test_illegal_utf8(self):
|
|
||||||
def test_illegal_utf8_recover(self):
|
|
||||||
data = _bytes('<test>\x80\x80\x80</test>', encoding='iso8859-1')
|
|
||||||
parser = etree.XMLParser(recover=True)
|
|
||||||
- self.assertRaises(etree.XMLSyntaxError, etree.fromstring, data, parser)
|
|
||||||
+ if etree.LIBXML_VERSION >= (2, 12, 0):
|
|
||||||
+ tree = etree.fromstring(data, parser)
|
|
||||||
+ self.assertEqual('\ufffd\ufffd\ufffd', tree.text)
|
|
||||||
+ else:
|
|
||||||
+ self.assertRaises(etree.XMLSyntaxError, etree.fromstring, data, parser)
|
|
||||||
|
|
||||||
def _test_encoding(self, encoding, xml_encoding_name=None):
|
|
||||||
foo = """<?xml version='1.0' encoding='%s'?>\n<tag attrib='123'></tag>""" % (
|
|
BIN
lxml-4.9.3.tar.gz
(Stored with Git LFS)
BIN
lxml-4.9.3.tar.gz
(Stored with Git LFS)
Binary file not shown.
3
lxml-4.9.4.tar.gz
Normal file
3
lxml-4.9.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b1541e50b78e15fa06a2670157a1962ef06591d4c998b998047fff5e3236880e
|
||||||
|
size 3576664
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 20 22:04:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 27 12:36:51 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
Mon Nov 27 12:36:51 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
@ -7,7 +20,7 @@ Mon Nov 27 12:36:51 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
|||||||
Wed Sep 6 20:04:29 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Wed Sep 6 20:04:29 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- skip html5lib tests - cyclic dependency with html5lib tests
|
- skip html5lib tests - cyclic dependency with html5lib tests
|
||||||
- remove python 2.x from testing
|
- remove python 2.x from testing
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 13 18:55:19 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Sun Aug 13 18:55:19 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
@ -59,7 +72,7 @@ Thu Apr 13 22:42:31 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 16 20:17:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Thu Feb 16 20:17:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- allow building against any libxml2 version in sle15
|
- allow building against any libxml2 version in sle15
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jan 20 16:00:15 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
Fri Jan 20 16:00:15 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
@ -113,7 +126,7 @@ Fri Feb 18 00:36:08 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
|||||||
override the default namespace of the factory.
|
override the default namespace of the factory.
|
||||||
* GH#338: In lxml.objectify, the XSI float annotation "nan" and "inf" were spelled in
|
* GH#338: In lxml.objectify, the XSI float annotation "nan" and "inf" were spelled in
|
||||||
lower case, whereas XML Schema datatypes define them as "NaN" and "INF" respectively.
|
lower case, whereas XML Schema datatypes define them as "NaN" and "INF" respectively.
|
||||||
* Built with Cython 0.29.28.
|
* Built with Cython 0.29.28.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 10 23:09:05 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
Mon Jan 10 23:09:05 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
@ -232,7 +245,7 @@ Thu Mar 5 12:44:43 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
|||||||
Wed Jan 22 13:55:03 UTC 2020 - Martin Sirringhaus <martin.sirringhaus@suse.com>
|
Wed Jan 22 13:55:03 UTC 2020 - Martin Sirringhaus <martin.sirringhaus@suse.com>
|
||||||
|
|
||||||
- Update to 4.4.2:
|
- Update to 4.4.2:
|
||||||
* LP#1835708: ElementInclude incorrectly rejected repeated
|
* LP#1835708: ElementInclude incorrectly rejected repeated
|
||||||
non-recursive includes as recursive.
|
non-recursive includes as recursive.
|
||||||
* Remove patch lxml-libxml-2.9.10.patch which is now upstream
|
* Remove patch lxml-libxml-2.9.10.patch which is now upstream
|
||||||
|
|
||||||
@ -373,7 +386,7 @@ Tue Aug 7 15:34:31 UTC 2018 - toddrme2178@gmail.com
|
|||||||
Wed Mar 28 17:05:30 UTC 2018 - hpj@urpla.net
|
Wed Mar 28 17:05:30 UTC 2018 - hpj@urpla.net
|
||||||
|
|
||||||
- Version update to 4.2.1:
|
- Version update to 4.2.1:
|
||||||
* LP#1755825: iterwalk() failed to return the 'start' event for the initial
|
* LP#1755825: iterwalk() failed to return the 'start' event for the initial
|
||||||
element if a tag selector is used.
|
element if a tag selector is used.
|
||||||
* LP#1756314: Failure to import 4.2.0 into PyPy due to a missing library symbol.
|
* LP#1756314: Failure to import 4.2.0 into PyPy due to a missing library symbol.
|
||||||
* LP#1727864, GH#258: Add "-isysroot" linker option on MacOS as needed by XCode 9.
|
* LP#1727864, GH#258: Add "-isysroot" linker option on MacOS as needed by XCode 9.
|
||||||
@ -472,37 +485,37 @@ Fri Jul 28 17:24:27 UTC 2017 - ecsos@opensuse.org
|
|||||||
|
|
||||||
- update to 3.8.0
|
- update to 3.8.0
|
||||||
Features added
|
Features added
|
||||||
- ElementTree.write() has a new option doctype that writes out
|
- ElementTree.write() has a new option doctype that writes out
|
||||||
a doctype string before the serialisation, in the same way as
|
a doctype string before the serialisation, in the same way as
|
||||||
tostring().
|
tostring().
|
||||||
- GH#220: xmlfile allows switching output methods at an element
|
- GH#220: xmlfile allows switching output methods at an element
|
||||||
level. Patch by Burak Arslan.
|
level. Patch by Burak Arslan.
|
||||||
- LP#1595781, GH#240: added a PyCapsule Python API and C-level
|
- LP#1595781, GH#240: added a PyCapsule Python API and C-level
|
||||||
API for passing externally generated libxml2 documents into
|
API for passing externally generated libxml2 documents into
|
||||||
lxml.
|
lxml.
|
||||||
- GH#244: error log entries have a new property path with an
|
- GH#244: error log entries have a new property path with an
|
||||||
XPath expression (if known, None otherwise) that points to the
|
XPath expression (if known, None otherwise) that points to the
|
||||||
tree element responsible for the error. Patch by Bob Kline.
|
tree element responsible for the error. Patch by Bob Kline.
|
||||||
- The namespace prefix mapping that can be used in ElementPath
|
- The namespace prefix mapping that can be used in ElementPath
|
||||||
now injects a default namespace when passing a None prefix.
|
now injects a default namespace when passing a None prefix.
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
- GH#238: Character escapes were not hex-encoded in the xmlfile
|
- GH#238: Character escapes were not hex-encoded in the xmlfile
|
||||||
serialiser. Patch by matejcik.
|
serialiser. Patch by matejcik.
|
||||||
- GH#229: fix for externally created XML documents.
|
- GH#229: fix for externally created XML documents.
|
||||||
Patch by Theodore Dubois.
|
Patch by Theodore Dubois.
|
||||||
- LP#1665241, GH#228: Form data handling in lxml.html no longer
|
- LP#1665241, GH#228: Form data handling in lxml.html no longer
|
||||||
strips the option values specified in form attributes but only
|
strips the option values specified in form attributes but only
|
||||||
the text values. Patch by Ashish Kulkarni.
|
the text values. Patch by Ashish Kulkarni.
|
||||||
- LP#1551797: revert previous fix for XSLT error logging as it
|
- LP#1551797: revert previous fix for XSLT error logging as it
|
||||||
breaks multi-threaded XSLT processing.
|
breaks multi-threaded XSLT processing.
|
||||||
- LP#1673355, GH#233: fromstring() html5parser failed to parse
|
- LP#1673355, GH#233: fromstring() html5parser failed to parse
|
||||||
byte strings.
|
byte strings.
|
||||||
Other changes
|
Other changes
|
||||||
- The previously undocumented docstring option in
|
- The previously undocumented docstring option in
|
||||||
ElementTree.write() produces a deprecation warning and will
|
ElementTree.write() produces a deprecation warning and will
|
||||||
eventually be removed.
|
eventually be removed.
|
||||||
- enable source url for pdf doc
|
- enable source url for pdf doc
|
||||||
- remove patch lxml-fix-attribute-quoting.patch because it is now
|
- remove patch lxml-fix-attribute-quoting.patch because it is now
|
||||||
in upstream
|
in upstream
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
@ -735,14 +748,14 @@ Thu Apr 24 06:48:15 UTC 2014 - toms@opensuse.org
|
|||||||
** Features added
|
** Features added
|
||||||
n/a
|
n/a
|
||||||
** Bugs fixed
|
** Bugs fixed
|
||||||
- HTML cleaning could fail to strip javascript links that mix
|
- HTML cleaning could fail to strip javascript links that mix
|
||||||
control characters into the link scheme.
|
control characters into the link scheme.
|
||||||
** Other changes
|
** Other changes
|
||||||
n/a
|
n/a
|
||||||
|
|
||||||
- Changes in version 3.3.4:
|
- Changes in version 3.3.4:
|
||||||
** Features added
|
** Features added
|
||||||
- Source line numbers above 65535 are available on Elements when
|
- Source line numbers above 65535 are available on Elements when
|
||||||
using libxml2 2.9 or later.
|
using libxml2 2.9 or later.
|
||||||
** Bugs fixed
|
** Bugs fixed
|
||||||
- lxml.html.fragment_fromstring() failed for bytes input in Py3.
|
- lxml.html.fragment_fromstring() failed for bytes input in Py3.
|
||||||
@ -794,9 +807,9 @@ Sat Feb 22 10:33:42 UTC 2014 - toms@opensuse.org
|
|||||||
** Features added
|
** Features added
|
||||||
n/a
|
n/a
|
||||||
** Bugs fixed
|
** Bugs fixed
|
||||||
- LP#1014290: HTML documents parsed with parser.feed() failed to
|
- LP#1014290: HTML documents parsed with parser.feed() failed to
|
||||||
find elements during tag iteration.
|
find elements during tag iteration.
|
||||||
- LP#1273709: Building in PyPy failed due to missing support for
|
- LP#1273709: Building in PyPy failed due to missing support for
|
||||||
PyUnicode_Compare() and PyByteArray_*() in PyPy's C-API.
|
PyUnicode_Compare() and PyByteArray_*() in PyPy's C-API.
|
||||||
- LP#1274413: Compilation in MSVC failed due to missing "stdint.h"
|
- LP#1274413: Compilation in MSVC failed due to missing "stdint.h"
|
||||||
standard header file.
|
standard header file.
|
||||||
@ -825,21 +838,21 @@ Sun Jan 26 13:02:19 UTC 2014 - toms@opensuse.org
|
|||||||
** Features added
|
** Features added
|
||||||
n/a
|
n/a
|
||||||
** Bugs fixed
|
** Bugs fixed
|
||||||
- The heuristic that distinguishes file paths from URLs was
|
- The heuristic that distinguishes file paths from URLs was
|
||||||
tightened to produce less false negatives.
|
tightened to produce less false negatives.
|
||||||
|
|
||||||
- Changes from 3.3.0beta5
|
- Changes from 3.3.0beta5
|
||||||
** Features added
|
** Features added
|
||||||
- The PEP 393 unicode parsing support gained a fallback for
|
- The PEP 393 unicode parsing support gained a fallback for
|
||||||
wchar strings which might still be somewhat common on Windows systems.
|
wchar strings which might still be somewhat common on Windows systems.
|
||||||
** Bugs fixed
|
** Bugs fixed
|
||||||
- Several error handling problems were fixed throughout the code base
|
- Several error handling problems were fixed throughout the code base
|
||||||
that could previously lead to exceptions being silently swallowed or
|
that could previously lead to exceptions being silently swallowed or
|
||||||
not properly reported.
|
not properly reported.
|
||||||
- The C-API function appendChild() is now deprecated as it does not
|
- The C-API function appendChild() is now deprecated as it does not
|
||||||
propagate exceptions (its return type is void). The new function
|
propagate exceptions (its return type is void). The new function
|
||||||
appendChildToElement() was added as a safe replacement.
|
appendChildToElement() was added as a safe replacement.
|
||||||
- Passing a string into fromstringlist() raises an exception instead of
|
- Passing a string into fromstringlist() raises an exception instead of
|
||||||
parsing the string character by character.
|
parsing the string character by character.
|
||||||
|
|
||||||
** Other changes
|
** Other changes
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-lxml
|
Name: python-lxml
|
||||||
Version: 4.9.3
|
Version: 4.9.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Pythonic XML processing library
|
Summary: Pythonic XML processing library
|
||||||
License: BSD-3-Clause AND GPL-2.0-or-later
|
License: BSD-3-Clause AND GPL-2.0-or-later
|
||||||
@ -42,9 +42,6 @@ Patch3: ISO-Schematron-schema-optional.patch
|
|||||||
# PATCH-FIX-UPSTREAM remove-ISO-Schematron-schema.patch gl#fedora/legal/fedora-license-data/-#154 mcepl@suse.com
|
# PATCH-FIX-UPSTREAM remove-ISO-Schematron-schema.patch gl#fedora/legal/fedora-license-data/-#154 mcepl@suse.com
|
||||||
# Actually remove the schema
|
# Actually remove the schema
|
||||||
Patch4: remove-ISO-Schematron-schema.patch
|
Patch4: remove-ISO-Schematron-schema.patch
|
||||||
# PATCH-FIX-UPSTREAM libxml2212-tests.patch https://github.com/lxml/lxml/pull/383
|
|
||||||
# Make Unicode recovery test work with upcoming libxml2 2.12
|
|
||||||
Patch5: libxml2212-tests.patch
|
|
||||||
BuildRequires: %{python_module Cython >= 0.29.7 with %python-Cython < 3}
|
BuildRequires: %{python_module Cython >= 0.29.7 with %python-Cython < 3}
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base}
|
||||||
BuildRequires: %{python_module cssselect >= 0.9.1}
|
BuildRequires: %{python_module cssselect >= 0.9.1}
|
||||||
|
Loading…
Reference in New Issue
Block a user