Hello community, here is the log from the commit of package python-html5lib for openSUSE:Factory checked in at 2015-08-07 00:23:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-07-28 11:41:43.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-html5lib.new/python-html5lib.changes 2015-08-07 00:23:34.000000000 +0200 @@ -1,0 +2,14 @@ +Mon Aug 3 16:30:05 UTC 2015 - [email protected] + +- Relax python-lxml BuildRequires and Requires. html5lib should + also work with older python-lxml modules. + +------------------------------------------------------------------- +Mon Jul 27 19:04:15 UTC 2015 - [email protected] + +- Update to version 0.999999 + * Fix #189: fix the sanitizer to allow relative URLs again + (as it did prior to 0.9999/1.0b5). +- Aligned version requirements with PyPI + +------------------------------------------------------------------- Old: ---- html5lib-0.99999.tar.gz New: ---- html5lib-0.999999.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-html5lib.spec ++++++ --- /var/tmp/diff_new_pack.OqlNpF/_old 2015-08-07 00:23:35.000000000 +0200 +++ /var/tmp/diff_new_pack.OqlNpF/_new 2015-08-07 00:23:35.000000000 +0200 @@ -17,22 +17,22 @@ Name: python-html5lib -Version: 0.99999 +Version: 0.999999 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 -BuildRequires: python-Genshi +BuildRequires: python-Genshi >= 0.7 BuildRequires: python-devel BuildRequires: python-lxml -BuildRequires: python-nose -BuildRequires: python-setuptools -BuildRequires: python-six -Requires: python-six +BuildRequires: python-nose >= 1.3.7 +BuildRequires: python-setuptools >= 18.0.1 +BuildRequires: python-six >= 1.9.0 +Requires: python-six >= 1.9.0 %if 0%{?suse_version} -Recommends: python-Genshi +Recommends: python-Genshi >= 0.7 Recommends: python-lxml %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ html5lib-0.99999.tar.gz -> html5lib-0.999999.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/CHANGES.rst new/html5lib-0.999999/CHANGES.rst --- old/html5lib-0.99999/CHANGES.rst 2015-04-30 21:55:49.000000000 +0200 +++ new/html5lib-0.999999/CHANGES.rst 2015-07-07 03:59:29.000000000 +0200 @@ -1,6 +1,15 @@ Change Log ---------- +0.999999/1.0b7 +~~~~~~~~~~~~~~ + +Released on July 7, 2015 + +* Fix #189: fix the sanitizer to allow relative URLs again (as it did + prior to 0.9999/1.0b5). + + 0.99999/1.0b6 ~~~~~~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/PKG-INFO new/html5lib-0.999999/PKG-INFO --- old/html5lib-0.99999/PKG-INFO 2015-04-30 22:00:05.000000000 +0200 +++ new/html5lib-0.999999/PKG-INFO 2015-07-07 03:59:36.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: html5lib -Version: 0.99999 +Version: 0.999999 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.999999/1.0b7 + ~~~~~~~~~~~~~~ + + Released on July 7, 2015 + + * Fix #189: fix the sanitizer to allow relative URLs again (as it did + prior to 0.9999/1.0b5). + + 0.99999/1.0b6 ~~~~~~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/html5lib/__init__.py new/html5lib-0.999999/html5lib/__init__.py --- old/html5lib-0.99999/html5lib/__init__.py 2015-04-30 22:00:02.000000000 +0200 +++ new/html5lib-0.999999/html5lib/__init__.py 2015-07-07 03:59:29.000000000 +0200 @@ -20,4 +20,6 @@ __all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder", "getTreeWalker", "serialize"] -__version__ = "0.99999" + +# this has to be at the top level, see how setup.py parses this +__version__ = "0.999999" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/html5lib/sanitizer.py new/html5lib-0.999999/html5lib/sanitizer.py --- old/html5lib-0.99999/html5lib/sanitizer.py 2015-04-30 17:17:38.000000000 +0200 +++ new/html5lib-0.999999/html5lib/sanitizer.py 2015-07-07 03:59:29.000000000 +0200 @@ -208,7 +208,7 @@ # remove replacement characters from unescaped characters val_unescaped = val_unescaped.replace("\ufffd", "") uri = urlparse.urlparse(val_unescaped) - if uri: + if uri and uri.scheme: if uri.scheme not in self.allowed_protocols: del attrs[attr] if uri.scheme == 'data': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/html5lib/tests/test_sanitizer.py new/html5lib-0.999999/html5lib/tests/test_sanitizer.py --- old/html5lib-0.99999/html5lib/tests/test_sanitizer.py 2015-04-30 17:30:14.000000000 +0200 +++ new/html5lib-0.999999/html5lib/tests/test_sanitizer.py 2015-07-07 03:59:29.000000000 +0200 @@ -40,6 +40,10 @@ assert '<html:p xmlns:html="http://www.w3.org/1999/xhtml">\U0001d4b5 \U0001d538</html:p>' == sanitize_html("<p>𝒵 𝔸</p>") +def test_should_allow_relative_uris(): + assert '<html:p xmlns:html="http://www.w3.org/1999/xhtml"><html:a href="/example.com" /></html:p>' == sanitize_html('<p><a href="/example.com"></a></p>') + + def test_sanitizer(): toxml = toxmlFactory() for tag_name in sanitizer.HTMLSanitizer.allowed_elements: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/html5lib/treewalkers/etree.py new/html5lib-0.999999/html5lib/treewalkers/etree.py --- old/html5lib-0.99999/html5lib/treewalkers/etree.py 2015-04-29 01:39:26.000000000 +0200 +++ new/html5lib-0.999999/html5lib/treewalkers/etree.py 2015-07-07 03:59:29.000000000 +0200 @@ -10,7 +10,7 @@ import re -from six import text_type +from six import string_types from . import _base from ..utils import moduleFactoryFactory @@ -58,7 +58,7 @@ return _base.COMMENT, node.text else: - assert type(node.tag) == text_type, type(node.tag) + assert isinstance(node.tag, string_types), type(node.tag) # This is assumed to be an ordinary element match = tag_regexp.match(node.tag) if match: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html5lib-0.99999/setup.py new/html5lib-0.999999/setup.py --- old/html5lib-0.99999/setup.py 2015-04-30 22:00:02.000000000 +0200 +++ new/html5lib-0.999999/setup.py 2015-07-07 03:59:29.000000000 +0200 @@ -1,4 +1,5 @@ from distutils.core import setup +import ast import os import codecs @@ -29,8 +30,20 @@ with codecs.open(os.path.join(current_dir, 'CHANGES.rst'), 'r', 'utf8') as changes_file: long_description = readme_file.read() + '\n' + changes_file.read() +version = None +with open(os.path.join("html5lib", "__init__.py"), "rb") as init_file: + t = ast.parse(init_file.read(), filename="__init__.py", mode="exec") + assert isinstance(t, ast.Module) + assignments = filter(lambda x: isinstance(x, ast.Assign), t.body) + for a in assignments: + if (len(a.targets) == 1 and + isinstance(a.targets[0], ast.Name) and + a.targets[0].id == "__version__" and + isinstance(a.value, ast.Str)): + version = a.value.s + setup(name='html5lib', - version='0.99999', + version=version, url='https://github.com/html5lib/html5lib-python', license="MIT License", description='HTML parser based on the WHATWG HTML specification',
