Hello community, here is the log from the commit of package python-Kajiki for openSUSE:Factory checked in at 2020-01-13 22:23:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Kajiki (Old) and /work/SRC/openSUSE:Factory/.python-Kajiki.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Kajiki" Mon Jan 13 22:23:22 2020 rev:11 rq:764113 version:0.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Kajiki/python-Kajiki.changes 2019-06-22 11:24:44.657421372 +0200 +++ /work/SRC/openSUSE:Factory/.python-Kajiki.new.6675/python-Kajiki.changes 2020-01-13 22:23:26.298571494 +0100 @@ -1,0 +2,7 @@ +Mon Jan 13 16:35:33 UTC 2020 - Marketa Calabkova <[email protected]> + +- update to 0.8.2 + * Fixed some HTML entities not being properly recognised + * Fixed unexpected <DOCTYPE> when including templates + +------------------------------------------------------------------- Old: ---- Kajiki-0.8.0.tar.gz New: ---- Kajiki-0.8.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Kajiki.spec ++++++ --- /var/tmp/diff_new_pack.my2GH2/_old 2020-01-13 22:23:27.138571884 +0100 +++ /var/tmp/diff_new_pack.my2GH2/_new 2020-01-13 22:23:27.142571886 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-Kajiki # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Kajiki -Version: 0.8.0 +Version: 0.8.2 Release: 0 Summary: Compiler for Genshi syntax outputting Python bytecode License: MIT ++++++ Kajiki-0.8.0.tar.gz -> Kajiki-0.8.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/CHANGES.rst new/Kajiki-0.8.2/CHANGES.rst --- old/Kajiki-0.8.0/CHANGES.rst 2019-06-03 12:46:52.000000000 +0200 +++ new/Kajiki-0.8.2/CHANGES.rst 2019-11-26 11:21:59.000000000 +0100 @@ -1,6 +1,16 @@ CHANGES ======= +0.8.2 (2019-11-26) +------------------ + +* Fixed some HTML entities not being properly recognised + +0.8.1 (2019-10-20) +------------------ + +* Fixed unexpected <DOCTYPE> when including templates + 0.8.0 (2019-06-03) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/Kajiki.egg-info/PKG-INFO new/Kajiki-0.8.2/Kajiki.egg-info/PKG-INFO --- old/Kajiki-0.8.0/Kajiki.egg-info/PKG-INFO 2019-06-03 12:56:48.000000000 +0200 +++ new/Kajiki-0.8.2/Kajiki.egg-info/PKG-INFO 2019-11-26 11:58:09.000000000 +0100 @@ -1,13 +1,12 @@ -Metadata-Version: 2.1 +Metadata-Version: 1.1 Name: Kajiki -Version: 0.8.0 +Version: 0.8.2 Summary: Fast XML-based template engine with Genshi syntax and Jinja blocks Home-page: https://github.com/nandoflorestan/kajiki -Author: Rick Copeland -Author-email: [email protected] -Maintainer: Nando Florestan -Maintainer-email: [email protected] +Author: Nando Florestan +Author-email: [email protected] License: MIT +Description-Content-Type: UNKNOWN Description: Kajiki provides fast well-formed XML templates ============================================== @@ -80,6 +79,16 @@ CHANGES ======= + 0.8.2 (2019-11-26) + ------------------ + + * Fixed some HTML entities not being properly recognised + + 0.8.1 (2019-10-20) + ------------------ + + * Fixed unexpected <DOCTYPE> when including templates + 0.8.0 (2019-06-03) ------------------ @@ -257,4 +266,3 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Processing :: Markup :: HTML Classifier: Topic :: Text Processing :: Markup :: XML -Provides-Extra: testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/PKG-INFO new/Kajiki-0.8.2/PKG-INFO --- old/Kajiki-0.8.0/PKG-INFO 2019-06-03 12:56:48.000000000 +0200 +++ new/Kajiki-0.8.2/PKG-INFO 2019-11-26 11:58:09.000000000 +0100 @@ -1,13 +1,12 @@ -Metadata-Version: 2.1 +Metadata-Version: 1.1 Name: Kajiki -Version: 0.8.0 +Version: 0.8.2 Summary: Fast XML-based template engine with Genshi syntax and Jinja blocks Home-page: https://github.com/nandoflorestan/kajiki -Author: Rick Copeland -Author-email: [email protected] -Maintainer: Nando Florestan -Maintainer-email: [email protected] +Author: Nando Florestan +Author-email: [email protected] License: MIT +Description-Content-Type: UNKNOWN Description: Kajiki provides fast well-formed XML templates ============================================== @@ -80,6 +79,16 @@ CHANGES ======= + 0.8.2 (2019-11-26) + ------------------ + + * Fixed some HTML entities not being properly recognised + + 0.8.1 (2019-10-20) + ------------------ + + * Fixed unexpected <DOCTYPE> when including templates + 0.8.0 (2019-06-03) ------------------ @@ -257,4 +266,3 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Processing :: Markup :: HTML Classifier: Topic :: Text Processing :: Markup :: XML -Provides-Extra: testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/kajiki/template.py new/Kajiki-0.8.2/kajiki/template.py --- old/Kajiki-0.8.0/kajiki/template.py 2019-06-03 12:45:52.000000000 +0200 +++ new/Kajiki-0.8.2/kajiki/template.py 2019-11-26 11:21:09.000000000 +0100 @@ -191,7 +191,14 @@ return obj == self._switch_stack[-1] def _import(self, name, alias, gbls): - tpl_cls = self.loader.import_(name) + # Load template as a fragment to avoid extra <DOCTYPE> in included output. + # Due to loader cache, this has the side effect that if the same + # template is both included and used as a standalone page + # it might act as a fragment or not depending on the order it was loaded. + # But usually templates meant for inclusion are not standalone pages. + # Also there is no way to set a template as a fragment once loaded. + # So we can only do it through the loader. + tpl_cls = self.loader.import_(name, is_fragment=True) if alias is None: alias = self.loader.default_alias_for(name) r = gbls[alias] = tpl_cls(gbls) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/kajiki/tests/test_xml.py new/Kajiki-0.8.2/kajiki/tests/test_xml.py --- old/Kajiki-0.8.0/kajiki/tests/test_xml.py 2018-04-16 22:29:29.000000000 +0200 +++ new/Kajiki-0.8.2/kajiki/tests/test_xml.py 2019-11-26 11:21:09.000000000 +0100 @@ -225,8 +225,8 @@ perform(source, source) def test_html_entities(self): - source = "<div>Spam Spam < Spam > Spam</div>" - output = '<div>Spam Spam < Spam > Spam</div>' + source = "<div>Spam Spam < Spam > Spam …</div>" + output = '<div>Spam Spam < Spam > Spam \u2026</div>' assert chr(32) in output # normal space assert chr(160) in output # non breaking space perform(source, output) @@ -483,6 +483,37 @@ '<p>The included template must also access Kajiki globals and ' 'the template context: Rick</p></body></html>' == rsp) + def test_include_html5(self): + '''Should not have DOCTYPE''' + class XMLSourceLoader(MockLoader): + """Fakes a FileLoader, but with source in a lookup table. + + It differs from MockLoader because MockLoader doesn't + create the template on load, it's already pre-instantiated + by the user of the MockLoader + """ + def __init__(self, sources): + self.sources = sources + super(XMLSourceLoader, self).__init__({}) + + def _load(self, name, encoding='utf-8', *args, **kwargs): + return XMLTemplate(source=self.sources[name], + mode='html5', + *args, **kwargs) + + loader = XMLSourceLoader({ + 'included.html': '<p>The included template must also ' + 'access Kajiki globals and the template context: ' + '${value_of("name")}</p>\n', + 'tpl.html': '<html><body><p>This is the body</p>\n' + '<py:include href="included.html"/></body></html>' + }) + tpl = loader.import_('tpl.html') + rsp = tpl(dict(name='Rick')).render() + assert ('<!DOCTYPE html>\n<html><body><p>This is the body</p>\n' + '<p>The included template must also access Kajiki globals and ' + 'the template context: Rick</p></body></html>' == rsp), rsp + class TestExtends(TestCase): def test_basic(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/kajiki/version.py new/Kajiki-0.8.2/kajiki/version.py --- old/Kajiki-0.8.0/kajiki/version.py 2019-06-03 12:55:48.000000000 +0200 +++ new/Kajiki-0.8.2/kajiki/version.py 2019-11-26 11:52:13.000000000 +0100 @@ -2,5 +2,5 @@ from __future__ import (absolute_import, division, print_function, unicode_literals) -__version__ = '0.7' -__release__ = '0.8.0' +__version__ = '0.8' +__release__ = '0.8.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Kajiki-0.8.0/kajiki/xml_template.py new/Kajiki-0.8.2/kajiki/xml_template.py --- old/Kajiki-0.8.0/kajiki/xml_template.py 2018-04-16 22:29:55.000000000 +0200 +++ new/Kajiki-0.8.2/kajiki/xml_template.py 2019-11-26 11:21:09.000000000 +0100 @@ -672,6 +672,12 @@ # The presence of a SYSTEM doctype makes expat say "hey, that MIGHT be # a valid entity, better pass it along to sax and find out!" # (Since expat is nonvalidating, it never reads the external doctypes.) + if name and name[-1] != ';': + # In entities.html5 sometimes the entities are recorded + # with/without semicolon. That list is copied from cPython + # itself, and we don't want to maintain a separate diff. + # So just ensure we ask for entities always recorded with trailing semicolon. + name += ';' return self.characters(html5[name]) def startElementNS(self, name, qname, attrs): # pragma no cover
