Hello community, here is the log from the commit of package python3-html5lib for openSUSE:Factory checked in at 2015-01-07 09:38:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-html5lib (Old) and /work/SRC/openSUSE:Factory/.python3-html5lib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-html5lib" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-html5lib/python3-html5lib.changes 2013-12-18 16:54:42.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-html5lib.new/python3-html5lib.changes 2015-01-07 09:38:32.000000000 +0100 @@ -1,0 +2,11 @@ +Sun Jan 4 19:43:39 UTC 2015 - [email protected] + +- specfile: + * updated copyright year + * updated url (moved to github) + +- update to version 0.999: + * Fix #127: add work-around for CPython issue #20007: .read(0) on http.client.HTTPResponse drops the rest of the content. + * Fix #115: lxml treewalker can now deal with fragments containing, at their root level, text nodes with non-ASCII characters on Python 2. + +------------------------------------------------------------------- Old: ---- html5lib-0.99.tar.gz New: ---- html5lib-0.999.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-html5lib.spec ++++++ --- /var/tmp/diff_new_pack.a0lV9u/_old 2015-01-07 09:38:33.000000000 +0100 +++ /var/tmp/diff_new_pack.a0lV9u/_new 2015-01-07 09:38:33.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-html5lib # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,13 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: python3-html5lib -Version: 0.99 +Version: 0.999 Release: 0 -License: MIT Summary: HTML parser based on the WHAT-WG Web Applications 1 -Url: http://code.google.com/p/html5lib/ +License: MIT Group: Development/Languages/Python +Url: http://code.google.com/p/html5lib/ Source: http://pypi.python.org/packages/source/h/html5lib/html5lib-%{version}.tar.gz BuildRequires: python3-devel # not available on python <= 3.2 ++++++ html5lib-0.99.tar.gz -> html5lib-0.999.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/CHANGES.rst new/html5lib-0.999/CHANGES.rst --- old/html5lib-0.99/CHANGES.rst 2013-09-10 20:12:27.000000000 +0200 +++ new/html5lib-0.999/CHANGES.rst 2013-12-23 16:13:25.000000000 +0100 @@ -1,6 +1,18 @@ Change Log ---------- +0.999 +~~~~~ + +Released on December 23, 2013 + +* Fix #127: add work-around for CPython issue #20007: .read(0) on + http.client.HTTPResponse drops the rest of the content. + +* Fix #115: lxml treewalker can now deal with fragments containing, at + their root level, text nodes with non-ASCII characters on Python 2. + + 0.99 ~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/PKG-INFO new/html5lib-0.999/PKG-INFO --- old/html5lib-0.99/PKG-INFO 2013-09-10 20:15:33.000000000 +0200 +++ new/html5lib-0.999/PKG-INFO 2013-12-23 16:13:57.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: html5lib -Version: 0.99 +Version: 0.999 Summary: HTML parser based on the WHATWG HTML specifcation Home-page: https://github.com/html5lib/html5lib-python Author: James Graham @@ -167,6 +167,18 @@ Change Log ---------- + 0.999 + ~~~~~ + + Released on December 23, 2013 + + * Fix #127: add work-around for CPython issue #20007: .read(0) on + http.client.HTTPResponse drops the rest of the content. + + * Fix #115: lxml treewalker can now deal with fragments containing, at + their root level, text nodes with non-ASCII characters on Python 2. + + 0.99 ~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/html5lib/__init__.py new/html5lib-0.999/html5lib/__init__.py --- old/html5lib-0.99/html5lib/__init__.py 2013-09-10 20:15:08.000000000 +0200 +++ new/html5lib-0.999/html5lib/__init__.py 2013-12-23 16:13:25.000000000 +0100 @@ -20,4 +20,4 @@ __all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder", "getTreeWalker", "serialize"] -__version__ = "0.99" +__version__ = "0.999" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/html5lib/inputstream.py new/html5lib-0.999/html5lib/inputstream.py --- old/html5lib-0.99/html5lib/inputstream.py 2013-09-05 22:59:49.000000000 +0200 +++ new/html5lib-0.999/html5lib/inputstream.py 2013-12-23 15:57:20.000000000 +0100 @@ -1,5 +1,6 @@ from __future__ import absolute_import, division, unicode_literals from six import text_type +from six.moves import http_client import codecs import re @@ -118,7 +119,11 @@ def HTMLInputStream(source, encoding=None, parseMeta=True, chardet=True): - if hasattr(source, "read"): + if isinstance(source, http_client.HTTPResponse): + # Work around Python bug #20007: read(0) closes the connection. + # http://bugs.python.org/issue20007 + isUnicode = False + elif hasattr(source, "read"): isUnicode = isinstance(source.read(0), text_type) else: isUnicode = isinstance(source, text_type) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/html5lib/tests/test_stream.py new/html5lib-0.999/html5lib/tests/test_stream.py --- old/html5lib-0.99/html5lib/tests/test_stream.py 2013-09-05 22:59:49.000000000 +0200 +++ new/html5lib-0.999/html5lib/tests/test_stream.py 2013-12-23 15:57:20.000000000 +0100 @@ -5,6 +5,8 @@ import codecs from io import BytesIO +from six.moves import http_client + from html5lib.inputstream import (BufferedStream, HTMLInputStream, HTMLUnicodeInputStream, HTMLBinaryInputStream) @@ -154,6 +156,20 @@ self.assertEqual(stream.char(), "d") self.assertEqual(stream.position(), (2, 1)) + def test_python_issue_20007(self): + """ + Make sure we have a work-around for Python bug #20007 + http://bugs.python.org/issue20007 + """ + class FakeSocket(object): + def makefile(self, _mode, _bufsize=None): + return BytesIO(b"HTTP/1.1 200 Ok\r\n\r\nText") + + source = http_client.HTTPResponse(FakeSocket()) + source.begin() + stream = HTMLInputStream(source) + self.assertEqual(stream.charsUntil(" "), "Text") + def buildTestSuite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/html5lib/treewalkers/lxmletree.py new/html5lib-0.999/html5lib/treewalkers/lxmletree.py --- old/html5lib-0.99/html5lib/treewalkers/lxmletree.py 2013-08-27 23:11:23.000000000 +0200 +++ new/html5lib-0.999/html5lib/treewalkers/lxmletree.py 2013-12-23 15:57:20.000000000 +0100 @@ -87,10 +87,6 @@ self.tail = ensure_str(self.obj.tail) else: self.tail = None - self.isstring = isinstance(obj, str) or isinstance(obj, bytes) - # Support for bytes here is Py2 - if self.isstring: - self.obj = ensure_str(self.obj) def __getattr__(self, name): return getattr(self.obj, name) @@ -143,7 +139,7 @@ elif isinstance(node, Doctype): return _base.DOCTYPE, node.name, node.public_id, node.system_id - elif isinstance(node, FragmentWrapper) and node.isstring: + elif isinstance(node, FragmentWrapper) and not hasattr(node, "tag"): return _base.TEXT, node.obj elif node.tag == etree.Comment: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99/setup.py new/html5lib-0.999/setup.py --- old/html5lib-0.99/setup.py 2013-09-10 20:15:08.000000000 +0200 +++ new/html5lib-0.999/setup.py 2013-12-23 16:13:25.000000000 +0100 @@ -29,7 +29,7 @@ long_description = readme_file.read() + '\n' + changes_file.read() setup(name='html5lib', - version='0.99', + version='0.999', url='https://github.com/html5lib/html5lib-python', license="MIT License", description='HTML parser based on the WHATWG HTML specifcation', -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
