From 65b2dcf74a3a0bee8d6e3b09d993207c24923f943b68cf22be6311aa125e2bf0 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Wed, 5 Nov 2014 14:09:18 +0000 Subject: [PATCH] Accepting request 259611 from home:mlin7442:branches:devel:languages:python update to 3.4.0 and add a patch that fixes test OBS-URL: https://build.opensuse.org/request/show/259611 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=78 --- lxml-3.3.5.tgz | 3 -- lxml-3.4.0.tar.gz | 3 ++ ...ont-depend-on-URL-formatting-in-test.patch | 29 ++++++++++++ lxmldoc-3.3.5.pdf | 3 -- lxmldoc-3.4.0.pdf | 3 ++ python-lxml.changes | 44 +++++++++++++++++++ python-lxml.spec | 10 +++-- 7 files changed, 85 insertions(+), 10 deletions(-) delete mode 100644 lxml-3.3.5.tgz create mode 100644 lxml-3.4.0.tar.gz create mode 100644 lxml-dont-depend-on-URL-formatting-in-test.patch delete mode 100644 lxmldoc-3.3.5.pdf create mode 100644 lxmldoc-3.4.0.pdf diff --git a/lxml-3.3.5.tgz b/lxml-3.3.5.tgz deleted file mode 100644 index 7434246..0000000 --- a/lxml-3.3.5.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ad6949dc7eea744a30fba77a968dd5910f545220e58bcc813b9df5c793e318a -size 3467344 diff --git a/lxml-3.4.0.tar.gz b/lxml-3.4.0.tar.gz new file mode 100644 index 0000000..ccdcb5f --- /dev/null +++ b/lxml-3.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:714a68bf567fdec2bb7959560dc8376c0bfc688cfceb135f43b9bd87af7a956a +size 3522134 diff --git a/lxml-dont-depend-on-URL-formatting-in-test.patch b/lxml-dont-depend-on-URL-formatting-in-test.patch new file mode 100644 index 0000000..03ebc75 --- /dev/null +++ b/lxml-dont-depend-on-URL-formatting-in-test.patch @@ -0,0 +1,29 @@ +From 720e43d6a0036ac12c438a5e5c1914d30d8603ff Mon Sep 17 00:00:00 2001 +From: Stefan Behnel +Date: Sun, 19 Oct 2014 08:39:35 +0200 +Subject: [PATCH] do not depend on formatting of "file:" URL in test (differs + across libxml2 versions) + +--- + src/lxml/tests/test_etree.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py +index 1aa8cd7..6dafe04 100644 +--- a/src/lxml/tests/test_etree.py ++++ b/src/lxml/tests/test_etree.py +@@ -1284,7 +1284,10 @@ class ETreeOnlyTestCase(HelperTestCase): + + class MyResolver(self.etree.Resolver): + def resolve(self, url, id, context): +- assertEqual(url, fileUrlInTestDir(test_url)) ++ expected = fileUrlInTestDir(test_url) ++ url = url.replace('file://', 'file:') # depends on libxml2 version ++ expected = expected.replace('file://', 'file:') ++ assertEqual(url, expected) + return self.resolve_filename( + fileUrlInTestDir('test.dtd'), context) + +-- +1.8.4.5 + diff --git a/lxmldoc-3.3.5.pdf b/lxmldoc-3.3.5.pdf deleted file mode 100644 index 7f2380f..0000000 --- a/lxmldoc-3.3.5.pdf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d634863c6c813578233d0657269b13b62706b7e7b6b5fd8fa79376a881a293fa -size 1121833 diff --git a/lxmldoc-3.4.0.pdf b/lxmldoc-3.4.0.pdf new file mode 100644 index 0000000..2707792 --- /dev/null +++ b/lxmldoc-3.4.0.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0709bd519d857c098f90a5841caa1a395c307bf28e9663500886db1038f71c6 +size 1126400 diff --git a/python-lxml.changes b/python-lxml.changes index 78a9cd0..246a27e 100644 --- a/python-lxml.changes +++ b/python-lxml.changes @@ -1,3 +1,47 @@ +------------------------------------------------------------------- +Tue Nov 4 07:43:22 UTC 2014 - mlin@suse.com + +- Update to 3.4.0 + * Features added + ** xmlfile(buffered=False) disables output buffering and flushes the + content after each API operation (starting/ending element blocks or + writes). A new method xf.flush() can alternatively be used to + explicitly flush the output. + ** lxml.html.document_fromstring has a new option ensure_head_body=True + which will add an empty head and/or body element to the result + document if missing. + ** lxml.html.iterlinks now returns links inside meta refresh tags. + ** New XMLParser option collect_ids=False to disable ID hash table + creation. This can substantially speed up parsing of documents with + many different IDs that are not used. + ** The parser uses per-document hash tables for XML IDs. This reduces + the load of the global parser dict and speeds up parsing for + documents with many different IDs. + ** ElementTree.getelementpath(element) returns a structural ElementPath + expression for the given element, which can be used for lookups later. + ** xmlfile() accepts a new argument close=True to close file(-like) + objects after writing to them. Before, xmlfile() only closed the file + if it had opened it internally. + ** Allow "bytearray" type for ASCII text input. + + * Other changes + ** LP#400588: decoding errors have become hard errors even in recovery + mode. Previously, they could lead to an internal tree representation + in a mixed encoding state, which lead to very late errors or even + silently incorrect behaviour during tree traversal or serialisation. + ** Requires Python 2.6, 2.7, 3.2 or later. No longer supports Python 2.4, + 2.5 and 3.1, use lxml 3.3.x for those. + ** Requires libxml2 2.7.0 or later and libxslt 1.1.23 or later, use lxml + 3.3.x with older versions. +- Add updatream patch lxml-dont-depend-on-URL-formatting-in-test.patch + * fix test +- Changes in 3.3.6 + * Bugs fixed + ** Prevent tree cycle creation when adding Elements as siblings. + ** LP#1361948: crash when deallocating Element siblings without parent. + ** LP#1354652: crash when traversing internally loaded documents in XSLT + extension functions. + ------------------------------------------------------------------- Thu Apr 24 06:48:15 UTC 2014 - toms@opensuse.org diff --git a/python-lxml.spec b/python-lxml.spec index 5d93040..bb9d46f 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -17,16 +17,17 @@ Name: python-lxml -Version: 3.3.5 +Version: 3.4.0 Release: 0 Summary: Powerful and Pythonic XML processing library License: BSD-3-Clause and GPL-2.0+ Group: Development/Languages/Python Url: http://lxml.de/ -Source: http://lxml.de/files/lxml-%{version}.tgz +Source: http://pypi.python.org/packages/source/l/lxml/lxml-%{version}.tar.gz Source1: http://lxml.de/lxmldoc-%{version}.pdf -BuildRequires: libxml2-devel -BuildRequires: libxslt-devel +Patch0: lxml-dont-depend-on-URL-formatting-in-test.patch +BuildRequires: libxml2-devel >= 2.7.0 +BuildRequires: libxslt-devel >= 1.1.23 BuildRequires: python-Cython >= 0.20 BuildRequires: python-devel BuildRequires: python-setuptools @@ -61,6 +62,7 @@ This package contains documentation for lxml (HTML and PDF). %prep %setup -q -n lxml-%{version} +%patch0 -p1 cp %{SOURCE1} . %build