forked from pool/python-lxml
		
	Accepting request 512948 from home:ecsos
update to 3.8.0 Need for calibre 3.5 OBS-URL: https://build.opensuse.org/request/show/512948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=96
This commit is contained in:
		| @@ -1,3 +0,0 @@ | ||||
| version https://git-lfs.github.com/spec/v1 | ||||
| oid sha256:aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7 | ||||
| size 3797713 | ||||
							
								
								
									
										3
									
								
								lxml-3.8.0.tar.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								lxml-3.8.0.tar.gz
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| version https://git-lfs.github.com/spec/v1 | ||||
| oid sha256:736f72be15caad8116891eb6aa4a078b590d231fdc63818c40c21624ac71db96 | ||||
| size 3795205 | ||||
| @@ -1,95 +0,0 @@ | ||||
| Index: lxml-3.7.3/src/lxml/tests/test_incremental_xmlfile.py | ||||
| =================================================================== | ||||
| --- lxml-3.7.3.orig/src/lxml/tests/test_incremental_xmlfile.py | ||||
| +++ lxml-3.7.3/src/lxml/tests/test_incremental_xmlfile.py | ||||
| @@ -430,7 +430,7 @@ class HtmlFileTestCase(_XmlFileTestCaseB | ||||
|              with xf.element("tagname", attrib={"attr": _str('"misquöted\\u3344\\U00013344"')}): | ||||
|                  xf.write("foo") | ||||
|   | ||||
| -        self.assertXml('<tagname attr=""misquöted㍄𓍄"">foo</tagname>') | ||||
| +        self.assertXml('<tagname attr=""misquöted㍄𓍄"">foo</tagname>') | ||||
|   | ||||
|      def test_unescaped_script(self): | ||||
|          with etree.htmlfile(self._file) as xf: | ||||
| Index: lxml-3.7.3/src/lxml/serializer.pxi | ||||
| =================================================================== | ||||
| --- lxml-3.7.3.orig/src/lxml/serializer.pxi | ||||
| +++ lxml-3.7.3/src/lxml/serializer.pxi | ||||
| @@ -481,6 +481,7 @@ cdef unsigned char *xmlSerializeHexCharR | ||||
|  cdef _write_attr_string(tree.xmlOutputBuffer* buf, const char *string): | ||||
|      cdef const char *base | ||||
|      cdef const char *cur | ||||
| +    cdef const unsigned char *ucur | ||||
|   | ||||
|      cdef unsigned char tmp[12] | ||||
|      cdef int val = 0 | ||||
| @@ -546,42 +547,44 @@ cdef _write_attr_string(tree.xmlOutputBu | ||||
|              cur += 1 | ||||
|              base = cur | ||||
|   | ||||
| -        elif (cur[0] >= 0x80) and (cur[1] != 0): | ||||
| +        elif (<const unsigned char>cur[0] >= 0x80) and (cur[1] != 0): | ||||
|   | ||||
|              if (base != cur): | ||||
|                  tree.xmlOutputBufferWrite(buf, cur - base, base) | ||||
|   | ||||
| -            if (cur[0] < 0xC0): | ||||
| +            ucur = <const unsigned char *>cur | ||||
| + | ||||
| +            if (ucur[0] < 0xC0): | ||||
|                  # invalid UTF-8 sequence | ||||
| -                val = cur[0] | ||||
| +                val = ucur[0] | ||||
|                  l = 1 | ||||
|   | ||||
| -            elif (cur[0] < 0xE0): | ||||
| -                val = (cur[0]) & 0x1F | ||||
| +            elif (ucur[0] < 0xE0): | ||||
| +                val = (ucur[0]) & 0x1F | ||||
|                  val <<= 6 | ||||
| -                val |= (cur[1]) & 0x3F | ||||
| +                val |= (ucur[1]) & 0x3F | ||||
|                  l = 2 | ||||
|   | ||||
| -            elif ((cur[0] < 0xF0) and (cur[2] != 0)): | ||||
| -                val = (cur[0]) & 0x0F | ||||
| +            elif ((ucur[0] < 0xF0) and (ucur[2] != 0)): | ||||
| +                val = (ucur[0]) & 0x0F | ||||
|                  val <<= 6 | ||||
| -                val |= (cur[1]) & 0x3F | ||||
| +                val |= (ucur[1]) & 0x3F | ||||
|                  val <<= 6 | ||||
| -                val |= (cur[2]) & 0x3F | ||||
| +                val |= (ucur[2]) & 0x3F | ||||
|                  l = 3 | ||||
|   | ||||
| -            elif ((cur[0] < 0xF8) and (cur[2] != 0) and (cur[3] != 0)): | ||||
| -                val = (cur[0]) & 0x07 | ||||
| +            elif ((ucur[0] < 0xF8) and (ucur[2] != 0) and (ucur[3] != 0)): | ||||
| +                val = (ucur[0]) & 0x07 | ||||
|                  val <<= 6 | ||||
| -                val |= (cur[1]) & 0x3F | ||||
| +                val |= (ucur[1]) & 0x3F | ||||
|                  val <<= 6 | ||||
| -                val |= (cur[2]) & 0x3F | ||||
| +                val |= (ucur[2]) & 0x3F | ||||
|                  val <<= 6 | ||||
| -                val |= (cur[3]) & 0x3F | ||||
| +                val |= (ucur[3]) & 0x3F | ||||
|                  l = 4 | ||||
|              else: | ||||
|                  # invalid UTF-8 sequence | ||||
| -                val = cur[0] | ||||
| +                val = ucur[0] | ||||
|                  l = 1 | ||||
|   | ||||
|              if ((l == 1) or (not tree.xmlIsCharQ(val))): | ||||
| @@ -590,7 +593,7 @@ cdef _write_attr_string(tree.xmlOutputBu | ||||
|              # We could do multiple things here. Just save | ||||
|              # as a char ref | ||||
|              xmlSerializeHexCharRef(tmp, val) | ||||
| -            tree.xmlOutputBufferWrite(buf, -1, <const char*> tmp) | ||||
| +            tree.xmlOutputBufferWrite(buf, len(tmp), <const char*> tmp) | ||||
|              cur += l | ||||
|              base = cur | ||||
|   | ||||
| @@ -1,3 +0,0 @@ | ||||
| version https://git-lfs.github.com/spec/v1 | ||||
| oid sha256:c195a0dc8f417a0c716ab16b82f30f66ea75206821c0f8a19fc1cdd56cf1e9d1 | ||||
| size 1127335 | ||||
							
								
								
									
										3
									
								
								lxmldoc-3.8.0.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								lxmldoc-3.8.0.pdf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| version https://git-lfs.github.com/spec/v1 | ||||
| oid sha256:e342fa61e8f1467d81e3166800935e75f021edb322397d997682c3c16e222252 | ||||
| size 1131272 | ||||
| @@ -1,3 +1,41 @@ | ||||
| ------------------------------------------------------------------- | ||||
| Fri Jul 28 17:24:27 UTC 2017 - ecsos@opensuse.org | ||||
|  | ||||
| - update to 3.8.0 | ||||
|   Features added | ||||
|   - ElementTree.write() has a new option doctype that writes out  | ||||
|     a doctype string before the serialisation, in the same way as  | ||||
|     tostring(). | ||||
|   - GH#220: xmlfile allows switching output methods at an element  | ||||
|     level. Patch by Burak Arslan. | ||||
|   - LP#1595781, GH#240: added a PyCapsule Python API and C-level  | ||||
|     API for passing externally generated libxml2 documents into  | ||||
|     lxml. | ||||
|   - GH#244: error log entries have a new property path with an  | ||||
|     XPath expression (if known, None otherwise) that points to the  | ||||
|     tree element responsible for the error. Patch by Bob Kline. | ||||
|   - The namespace prefix mapping that can be used in ElementPath  | ||||
|     now injects a default namespace when passing a None prefix. | ||||
|   Bugs fixed | ||||
|   - GH#238: Character escapes were not hex-encoded in the xmlfile  | ||||
|     serialiser. Patch by matejcik. | ||||
|   - GH#229: fix for externally created XML documents.  | ||||
|     Patch by Theodore Dubois. | ||||
|   - LP#1665241, GH#228: Form data handling in lxml.html no longer | ||||
|     strips the option values specified in form attributes but only  | ||||
|     the text values. Patch by Ashish Kulkarni. | ||||
|   - LP#1551797: revert previous fix for XSLT error logging as it  | ||||
|     breaks multi-threaded XSLT processing. | ||||
|   - LP#1673355, GH#233: fromstring() html5parser failed to parse  | ||||
|     byte strings. | ||||
|   Other changes | ||||
|   - The previously undocumented docstring option in  | ||||
|     ElementTree.write() produces a deprecation warning and will  | ||||
|     eventually be removed. | ||||
| - enable source url for pdf doc | ||||
| - remove patch lxml-fix-attribute-quoting.patch because it is now  | ||||
|   in upstream | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Tue Apr 11 16:29:04 UTC 2017 - jmatejek@suse.com | ||||
|  | ||||
|   | ||||
| @@ -18,17 +18,14 @@ | ||||
|  | ||||
| %{?!python_module:%define python_module() python-%{**} python3-%{**}} | ||||
| Name:           python-lxml | ||||
| Version:        3.7.3 | ||||
| Version:        3.8.0 | ||||
| Release:        0 | ||||
| Summary:        Powerful and Pythonic XML processing library | ||||
| License:        BSD-3-Clause and GPL-2.0+ | ||||
| Group:          Development/Languages/Python | ||||
| Url:            https://lxml.de/ | ||||
| Source:         https://files.pythonhosted.org/packages/source/l/lxml/lxml-%{version}.tar.gz | ||||
| #Source1:        https://lxml.de/lxmldoc-%{version}.pdf | ||||
| Source1:        lxmldoc-%{version}.pdf | ||||
| # PATCH-FIX-UPSTREAM fix attribute quoting inactive code https://github.com/lxml/lxml/pull/238 | ||||
| Patch0:         lxml-fix-attribute-quoting.patch | ||||
| Source1:        http://lxml.de/lxmldoc-%{version}.pdf | ||||
| BuildRequires:  %{python_module Cython >= 0.22.1} | ||||
| BuildRequires:  %{python_module devel} | ||||
| BuildRequires:  %{python_module setuptools >= 18.0.1} | ||||
| @@ -77,7 +74,6 @@ This package contains header files needed to use lxml's C API. | ||||
| %prep | ||||
| %setup -q -n lxml-%{version} | ||||
| cp %{SOURCE1} . | ||||
| %patch0 -p1 | ||||
|  | ||||
| # remove generated files | ||||
| rm src/lxml/lxml.etree.c | ||||
|   | ||||
		Reference in New Issue
	
	Block a user