Hello community,

here is the log from the commit of package python-html5lib for openSUSE:Factory 
checked in at 2016-02-23 16:53:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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  
2015-08-07 00:23:34.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-html5lib.new/python-html5lib.changes     
2016-02-23 16:53:52.000000000 +0100
@@ -1,0 +2,22 @@
+Fri Feb 12 14:54:04 UTC 2016 - [email protected]
+
+- Add coerce_comments_to_work_with_lxml.patch
+  Fixes compatibility with python-lxml 3.5+, which adds validation
+  for xml comments.
+  Should be in next release/
+- Re-enable tests.
+
+-------------------------------------------------------------------
+Tue Feb  2 11:46:24 UTC 2016 - [email protected]
+
+- Disable broken tests.
+  Check if they are working again in the next release.
+
+-------------------------------------------------------------------
+Mon Feb  1 10:33:59 UTC 2016 - [email protected]
+
+- update to version 0.9999999:
+  * Fix #195: fix the sanitizer to drop broken URLs (it threw an
+    exception between 0.9999 and 0.999999).
+
+-------------------------------------------------------------------

Old:
----
  html5lib-0.999999.tar.gz

New:
----
  coerce_comments_to_work_with_lxml.patch
  html5lib-0.9999999.tar.gz

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

Other differences:
------------------
++++++ python-html5lib.spec ++++++
--- /var/tmp/diff_new_pack.8JJ3TM/_old  2016-02-23 16:53:53.000000000 +0100
+++ /var/tmp/diff_new_pack.8JJ3TM/_new  2016-02-23 16:53:53.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-html5lib
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,17 +17,20 @@
 
 
 Name:           python-html5lib
-Version:        0.999999
+Version:        0.9999999
 Release:        0
 Summary:        HTML parser based on the WHAT-WG Web Applications 1
 License:        MIT
 Group:          Development/Languages/Python
 Url:            https://github.com/html5lib/html5lib-python
 Source:         
http://pypi.python.org/packages/source/h/html5lib/html5lib-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM coerce_comments_to_work_with_lxml.patch - fix comments 
for new lxml comment validation - 
https://github.com/html5lib/html5lib-python/issues/224
+Patch0:         coerce_comments_to_work_with_lxml.patch
 BuildRequires:  python-Genshi >= 0.7
 BuildRequires:  python-devel
 BuildRequires:  python-lxml
-BuildRequires:  python-nose >= 1.3.7
+BuildRequires:  python-mock
+BuildRequires:  python-pytest
 BuildRequires:  python-setuptools >= 18.0.1
 BuildRequires:  python-six >= 1.9.0
 Requires:       python-six >= 1.9.0
@@ -55,6 +58,7 @@
 
 %prep
 %setup -q -n html5lib-%{version}
+%patch0 -p1
 
 %build
 python setup.py build
@@ -64,7 +68,8 @@
 
 %if 0%{?suse_version} && 0%{?suse_version} > 1110
 %check
-nosetests
+export LANG=en_US.UTF-8 
+py.test
 %endif
 
 %files

++++++ coerce_comments_to_work_with_lxml.patch ++++++
>From 0c551c9519e47f76f8f185089ed71cb9539b6e00 Mon Sep 17 00:00:00 2001
From: Geoffrey Sneddon <[email protected]>
Date: Mon, 23 Nov 2015 15:17:07 +0000
Subject: [PATCH] Make lxml tree-builder coerce comments to work with lxml 3.5.

---
 html5lib/ihatexml.py                | 3 +++
 html5lib/treebuilders/etree_lxml.py | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/html5lib/ihatexml.py b/html5lib/ihatexml.py
index 0fc7930..5da5d93 100644
--- a/html5lib/ihatexml.py
+++ b/html5lib/ihatexml.py
@@ -225,6 +225,9 @@ def coerceComment(self, data):
             while "--" in data:
                 warnings.warn("Comments cannot contain adjacent dashes", 
DataLossWarning)
                 data = data.replace("--", "- -")
+            if data.endswith("-"):
+                warnings.warn("Comments cannot end in a dash", DataLossWarning)
+                data += " "
         return data
 
     def coerceCharacters(self, data):
diff --git a/html5lib/treebuilders/etree_lxml.py 
b/html5lib/treebuilders/etree_lxml.py
index 35d08ef..c6c981f 100644
--- a/html5lib/treebuilders/etree_lxml.py
+++ b/html5lib/treebuilders/etree_lxml.py
@@ -54,7 +54,7 @@ def _getChildNodes(self):
 def testSerializer(element):
     rv = []
     finalText = None
-    infosetFilter = ihatexml.InfosetFilter()
+    infosetFilter = ihatexml.InfosetFilter(preventDoubleDashComments=True)
 
     def serializeElement(element, indent=0):
         if not hasattr(element, "tag"):
@@ -189,7 +189,7 @@ class TreeBuilder(_base.TreeBuilder):
 
     def __init__(self, namespaceHTMLElements, fullTree=False):
         builder = etree_builders.getETreeModule(etree, fullTree=fullTree)
-        infosetFilter = self.infosetFilter = ihatexml.InfosetFilter()
+        infosetFilter = self.infosetFilter = 
ihatexml.InfosetFilter(preventDoubleDashComments=True)
         self.namespaceHTMLElements = namespaceHTMLElements
 
         class Attributes(dict):
@@ -257,7 +257,7 @@ def _getData(self):
             data = property(_getData, _setData)
 
         self.elementClass = Element
-        self.commentClass = builder.Comment
+        self.commentClass = Comment
         # self.fragmentClass = builder.DocumentFragment
         _base.TreeBuilder.__init__(self, namespaceHTMLElements)
 
@@ -344,7 +344,8 @@ def insertRoot(self, token):
 
         # Append the initial comments:
         for comment_token in self.initial_comments:
-            root.addprevious(etree.Comment(comment_token["data"]))
+            comment = self.commentClass(comment_token["data"])
+            root.addprevious(comment._element)
 
         # Create the root document and add the ElementTree to it
         self.document = self.documentClass()
++++++ html5lib-0.999999.tar.gz -> html5lib-0.9999999.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html5lib-0.999999/CHANGES.rst 
new/html5lib-0.9999999/CHANGES.rst
--- old/html5lib-0.999999/CHANGES.rst   2015-07-07 03:59:29.000000000 +0200
+++ new/html5lib-0.9999999/CHANGES.rst  2015-09-10 01:07:50.000000000 +0200
@@ -1,6 +1,15 @@
 Change Log
 ----------
 
+0.9999999/1.0b8
+~~~~~~~~~~~~~~~
+
+Released on September 10, 2015
+
+* Fix #195: fix the sanitizer to drop broken URLs (it threw an
+  exception between 0.9999 and 0.999999).
+
+
 0.999999/1.0b7
 ~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html5lib-0.999999/PKG-INFO 
new/html5lib-0.9999999/PKG-INFO
--- old/html5lib-0.999999/PKG-INFO      2015-07-07 03:59:36.000000000 +0200
+++ new/html5lib-0.9999999/PKG-INFO     2015-09-10 01:08:12.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: html5lib
-Version: 0.999999
+Version: 0.9999999
 Summary: HTML parser based on the WHATWG HTML specification
 Home-page: https://github.com/html5lib/html5lib-python
 Author: James Graham
@@ -167,6 +167,15 @@
         Change Log
         ----------
         
+        0.9999999/1.0b8
+        ~~~~~~~~~~~~~~~
+        
+        Released on September 10, 2015
+        
+        * Fix #195: fix the sanitizer to drop broken URLs (it threw an
+          exception between 0.9999 and 0.999999).
+        
+        
         0.999999/1.0b7
         ~~~~~~~~~~~~~~
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html5lib-0.999999/html5lib/__init__.py 
new/html5lib-0.9999999/html5lib/__init__.py
--- old/html5lib-0.999999/html5lib/__init__.py  2015-07-07 03:59:29.000000000 
+0200
+++ new/html5lib-0.9999999/html5lib/__init__.py 2015-09-10 01:07:50.000000000 
+0200
@@ -22,4 +22,4 @@
            "getTreeWalker", "serialize"]
 
 # this has to be at the top level, see how setup.py parses this
-__version__ = "0.999999"
+__version__ = "0.9999999"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html5lib-0.999999/html5lib/sanitizer.py 
new/html5lib-0.9999999/html5lib/sanitizer.py
--- old/html5lib-0.999999/html5lib/sanitizer.py 2015-07-07 03:59:29.000000000 
+0200
+++ new/html5lib-0.9999999/html5lib/sanitizer.py        2015-09-08 
01:37:03.000000000 +0200
@@ -207,7 +207,11 @@
                                        unescape(attrs[attr])).lower()
                 # remove replacement characters from unescaped characters
                 val_unescaped = val_unescaped.replace("\ufffd", "")
-                uri = urlparse.urlparse(val_unescaped)
+                try:
+                    uri = urlparse.urlparse(val_unescaped)
+                except ValueError:
+                    uri = None
+                    del attrs[attr]
                 if uri and uri.scheme:
                     if uri.scheme not in self.allowed_protocols:
                         del attrs[attr]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html5lib-0.999999/html5lib/tests/test_sanitizer.py 
new/html5lib-0.9999999/html5lib/tests/test_sanitizer.py
--- old/html5lib-0.999999/html5lib/tests/test_sanitizer.py      2015-07-07 
03:59:29.000000000 +0200
+++ new/html5lib-0.9999999/html5lib/tests/test_sanitizer.py     2015-09-08 
01:37:03.000000000 +0200
@@ -113,6 +113,11 @@
            "<audio controls=\"\" src=\"data:foobar\"></audio>",
            toxml)
 
+    yield (runSanitizerTest, "test_invalid_ipv6_url",
+           "<a>",
+           "<a href=\"h://]\">",
+           toxml)
+
     yield (runSanitizerTest, "test_data_uri_disallowed_type",
            "<audio controls=\"\"></audio>",
            "<audio controls=\"\" src=\"data:text/html,<html>\"></audio>",


Reply via email to