Hello community,

here is the log from the commit of package python-j2gen for openSUSE:Factory 
checked in at 2019-09-30 16:01:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-j2gen (Old)
 and      /work/SRC/openSUSE:Factory/.python-j2gen.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-j2gen"

Mon Sep 30 16:01:53 2019 rev:2 rq:734019 version:0.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-j2gen/python-j2gen.changes        
2019-09-27 14:53:14.988015654 +0200
+++ /work/SRC/openSUSE:Factory/.python-j2gen.new.2352/python-j2gen.changes      
2019-09-30 16:02:00.388800263 +0200
@@ -1,0 +2,12 @@
+Mon Sep 30 08:26:37 UTC 2019 - Thomas Bechtold <[email protected]>
+
+- update to 0.1.0:
+* Error out when template variables are not defined
+
+-------------------------------------------------------------------
+Fri Sep 27 07:48:59 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Format with spec-cleaner
+- Do not pull in devel python module as it is not needed
+
+-------------------------------------------------------------------

Old:
----
  j2gen-0.0.1.tar.gz

New:
----
  j2gen-0.1.0.tar.gz

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

Other differences:
------------------
++++++ python-j2gen.spec ++++++
--- /var/tmp/diff_new_pack.I3OTEj/_old  2019-09-30 16:02:01.512797272 +0200
+++ /var/tmp/diff_new_pack.I3OTEj/_new  2019-09-30 16:02:01.548797176 +0200
@@ -19,17 +19,20 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-j2gen
-Version:        0.0.1
+Version:        0.1.0
 Release:        0
 Summary:        Jinja2 template renderer with yaml input files
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            https://github.com/toabctl/j2gen
+URL:            https://github.com/toabctl/j2gen
 Source:         
https://files.pythonhosted.org/packages/source/j/j2gen/j2gen-%{version}.tar.gz
-BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module pbr}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-Jinja2
+Requires:       python-PyYAML
+BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module Jinja2}
 BuildRequires:  %{python_module PyYAML}
@@ -37,11 +40,6 @@
 BuildRequires:  %{python_module flake8}
 BuildRequires:  %{python_module pytest}
 # /SECTION
-BuildRequires:  fdupes
-Requires:       python-Jinja2
-Requires:       python-PyYAML
-BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -56,6 +54,7 @@
 %install
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
+
 %check
 %python_exec setup.py test
 

++++++ j2gen-0.0.1.tar.gz -> j2gen-0.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/j2gen-0.0.1/ChangeLog new/j2gen-0.1.0/ChangeLog
--- old/j2gen-0.0.1/ChangeLog   2019-09-27 05:38:31.000000000 +0200
+++ new/j2gen-0.1.0/ChangeLog   2019-09-30 10:25:44.000000000 +0200
@@ -1,6 +1,11 @@
 CHANGES
 =======
 
+0.1.0
+-----
+
+* Error out when template variables are not defined
+
 0.0.1
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/j2gen-0.0.1/PKG-INFO new/j2gen-0.1.0/PKG-INFO
--- old/j2gen-0.0.1/PKG-INFO    2019-09-27 05:38:32.000000000 +0200
+++ new/j2gen-0.1.0/PKG-INFO    2019-09-30 10:25:44.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: j2gen
-Version: 0.0.1
+Version: 0.1.0
 Summary: Jinja2 template renderer with yaml input files
 Home-page: https://github.com/toabctl/j2gen
 Author: Thomas Bechtold
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/j2gen-0.0.1/j2gen/__init__.py 
new/j2gen-0.1.0/j2gen/__init__.py
--- old/j2gen-0.0.1/j2gen/__init__.py   2019-09-26 17:13:02.000000000 +0200
+++ new/j2gen-0.1.0/j2gen/__init__.py   2019-09-30 10:23:57.000000000 +0200
@@ -51,7 +51,9 @@
 def _do_process_generate(args):
     # open the template
     with open(args.template, 'r') as tpl:
-        template = jinja2.Template(tpl.read())
+        template = jinja2.Template(
+            tpl.read(),
+            undefined=jinja2.StrictUndefined)
 
     # open the input file(s)
     input_data = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/j2gen-0.0.1/j2gen/tests/test_base.py 
new/j2gen-0.1.0/j2gen/tests/test_base.py
--- old/j2gen-0.0.1/j2gen/tests/test_base.py    2019-09-26 17:13:41.000000000 
+0200
+++ new/j2gen-0.1.0/j2gen/tests/test_base.py    2019-09-30 10:23:57.000000000 
+0200
@@ -20,6 +20,7 @@
 
 from ddt import ddt, data, unpack
 
+import jinja2
 import j2gen
 
 
@@ -93,6 +94,23 @@
                 for i in inputs:
                     i.close()
 
+    def test__do_process_generate_undefined_variable(self):
+        with tempfile.NamedTemporaryFile(mode='w') as tpl, \
+             tempfile.NamedTemporaryFile(mode='w') as input1:
+            # write template example
+            tpl.write('{{ unkown }}')
+            tpl.seek(0)
+            # write input
+            input1.write("""---
+            well_known: 1""")
+            input1.seek(0)
+            # do the work
+            ns = argparse.Namespace(output='-',
+                                    input=[input1.name],
+                                    template=tpl.name)
+            with self.assertRaises(jinja2.exceptions.UndefinedError):
+                j2gen._do_process_generate(ns)
+
 
 if __name__ == '__main__':
     unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/j2gen-0.0.1/j2gen.egg-info/PKG-INFO 
new/j2gen-0.1.0/j2gen.egg-info/PKG-INFO
--- old/j2gen-0.0.1/j2gen.egg-info/PKG-INFO     2019-09-27 05:38:31.000000000 
+0200
+++ new/j2gen-0.1.0/j2gen.egg-info/PKG-INFO     2019-09-30 10:25:44.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: j2gen
-Version: 0.0.1
+Version: 0.1.0
 Summary: Jinja2 template renderer with yaml input files
 Home-page: https://github.com/toabctl/j2gen
 Author: Thomas Bechtold
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/j2gen-0.0.1/j2gen.egg-info/pbr.json 
new/j2gen-0.1.0/j2gen.egg-info/pbr.json
--- old/j2gen-0.0.1/j2gen.egg-info/pbr.json     2019-09-27 05:38:31.000000000 
+0200
+++ new/j2gen-0.1.0/j2gen.egg-info/pbr.json     2019-09-30 10:25:44.000000000 
+0200
@@ -1 +1 @@
-{"git_version": "ec061bd", "is_release": true}
\ No newline at end of file
+{"git_version": "5613057", "is_release": true}
\ No newline at end of file


Reply via email to