Hello community,

here is the log from the commit of package python-html5lib for openSUSE:Factory 
checked in at 2014-06-04 18:39:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-html5lib (Old)
 and      /work/SRC/openSUSE:Factory/.python-html5lib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-html5lib"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-html5lib/python-html5lib.changes  
2013-10-23 13:11:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-html5lib.new/python-html5lib.changes     
2014-06-04 18:39:28.000000000 +0200
@@ -1,0 +2,12 @@
+Mon May 26 22:01:47 UTC 2014 - [email protected]
+
+- update to 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.
+
+- enable tests and include test suite for further validations
+  for distributions > 11.1 and SLES 10
+
+-------------------------------------------------------------------

Old:
----
  html5lib-0.99.tar.gz

New:
----
  html5lib-0.999.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-html5lib.spec ++++++
--- /var/tmp/diff_new_pack.hF5WuX/_old  2014-06-04 18:39:30.000000000 +0200
+++ /var/tmp/diff_new_pack.hF5WuX/_new  2014-06-04 18:39:30.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-html5lib
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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,24 +15,26 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           python-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:  python-devel
 BuildRequires:  python-Genshi
+BuildRequires:  python-devel
 BuildRequires:  python-lxml
+BuildRequires:  python-nose
 BuildRequires:  python-setuptools
 BuildRequires:  python-six
 Requires:       python-six
 Recommends:     python-Genshi
 Recommends:     python-lxml
-#BuildRequires:  python-nose
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %else
@@ -58,8 +60,10 @@
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
 
-#%%check
-#nosetests
+%if 0%{?suse_version} && 0%{?suse_version} > 1110
+%check
+nosetests
+%endif
 
 %files
 %defattr(-,root,root,-)

++++++ 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]

Reply via email to