Hello community,

here is the log from the commit of package python-Js2Py for openSUSE:Factory 
checked in at 2020-04-22 20:42:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Js2Py (Old)
 and      /work/SRC/openSUSE:Factory/.python-Js2Py.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Js2Py"

Wed Apr 22 20:42:11 2020 rev:6 rq:794845 version:0.70

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Js2Py/python-Js2Py.changes        
2020-03-27 00:30:21.940410842 +0100
+++ /work/SRC/openSUSE:Factory/.python-Js2Py.new.2738/python-Js2Py.changes      
2020-04-22 20:42:18.462137167 +0200
@@ -1,0 +2,6 @@
+Fri Apr 17 09:27:55 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com>
+
+- update to version 0.70
+  * fix error messages
+
+-------------------------------------------------------------------
@@ -4 +10 @@
-- update to version .68
+- update to version 0.68

Old:
----
  Js2Py-0.68.tar.gz

New:
----
  Js2Py-0.70.tar.gz

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

Other differences:
------------------
++++++ python-Js2Py.spec ++++++
--- /var/tmp/diff_new_pack.kJnq5y/_old  2020-04-22 20:42:18.942138107 +0200
+++ /var/tmp/diff_new_pack.kJnq5y/_new  2020-04-22 20:42:18.942138107 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-Js2Py
-Version:        0.68
+Version:        0.70
 Release:        0
 Summary:        JavaScript to Python Translator & JavaScript interpreter
 License:        MIT

++++++ Js2Py-0.68.tar.gz -> Js2Py-0.70.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Js2Py-0.68/Js2Py.egg-info/PKG-INFO 
new/Js2Py-0.70/Js2Py.egg-info/PKG-INFO
--- old/Js2Py-0.68/Js2Py.egg-info/PKG-INFO      2020-03-07 14:29:22.000000000 
+0100
+++ new/Js2Py-0.70/Js2Py.egg-info/PKG-INFO      2020-04-11 11:58:17.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: Js2Py
-Version: 0.68
+Version: 0.70
 Summary: JavaScript to Python Translator & JavaScript interpreter written in 
100% pure Python.
 Home-page: https://github.com/PiotrDabkowski/Js2Py
 Author: Piotr Dabkowski
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Js2Py-0.68/PKG-INFO new/Js2Py-0.70/PKG-INFO
--- old/Js2Py-0.68/PKG-INFO     2020-03-07 14:29:23.000000000 +0100
+++ new/Js2Py-0.70/PKG-INFO     2020-04-11 11:58:17.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: Js2Py
-Version: 0.68
+Version: 0.70
 Summary: JavaScript to Python Translator & JavaScript interpreter written in 
100% pure Python.
 Home-page: https://github.com/PiotrDabkowski/Js2Py
 Author: Piotr Dabkowski
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Js2Py-0.68/js2py/base.py new/Js2Py-0.70/js2py/base.py
--- old/Js2Py-0.68/js2py/base.py        2019-04-18 16:27:59.000000000 +0200
+++ new/Js2Py-0.70/js2py/base.py        2020-04-11 11:51:58.000000000 +0200
@@ -126,7 +126,7 @@
             except Exception as e:
                 message = 'your Python function failed!  '
                 try:
-                    message += e.message
+                    message += str(e)
                 except:
                     pass
                 raise MakeError('Error', message)
@@ -319,7 +319,7 @@
         #prop = prop.value
         if self.Class == 'Undefined' or self.Class == 'Null':
             raise MakeError('TypeError',
-                            'Undefined and null dont have properties!')
+                            'Undefined and null dont have properties (tried 
getting property %s)' % repr(prop))
         if not isinstance(prop, basestring):
             prop = prop.to_string().value
         if not isinstance(prop, basestring): raise RuntimeError('Bug')
@@ -361,7 +361,7 @@
            * / % + - << >> & ^ |'''
         if self.Class == 'Undefined' or self.Class == 'Null':
             raise MakeError('TypeError',
-                            'Undefined and null dont have properties!')
+                            'Undefined and null don\'t have properties (tried 
setting property %s)' % repr(prop))
         if not isinstance(prop, basestring):
             prop = prop.to_string().value
         if NUMPY_AVAILABLE and prop.isdigit():
@@ -991,7 +991,8 @@
         cand = self.get(prop)
         if not cand.is_callable():
             raise MakeError('TypeError',
-                            '%s is not a function' % cand.typeof())
+                            '%s is not a function (tried calling property %s 
of %s)' % (
+                            cand.typeof(), repr(prop), repr(self.Class)))
         return cand.call(self, args)
 
     def to_python(self):
@@ -1304,7 +1305,7 @@
         except Exception as e:
             message = 'your Python function failed!  '
             try:
-                message += e.message
+                message += str(e)
             except:
                 pass
             raise MakeError('Error', message)
@@ -1464,9 +1465,11 @@
         except NotImplementedError:
             raise
         except RuntimeError as e:  # maximum recursion
-            raise MakeError(
-                'RangeError', e.message if
-                not isinstance(e, NotImplementedError) else 'Not implemented!')
+            try:
+                msg = e.message
+            except:
+                msg = repr(e)
+            raise MakeError('RangeError', msg)
 
     def has_instance(self, other):
         # I am not sure here so instanceof may not work lol.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Js2Py-0.68/js2py/node_import.py 
new/Js2Py-0.70/js2py/node_import.py
--- old/Js2Py-0.68/js2py/node_import.py 2020-03-07 00:35:39.000000000 +0100
+++ new/Js2Py-0.70/js2py/node_import.py 2020-04-11 11:33:00.000000000 +0200
@@ -130,7 +130,7 @@
     return py_code
 
 
-def require(module_name, include_polyfill=False, update=False, context=None):
+def require(module_name, include_polyfill=True, update=False, context=None):
     """
     Installs the provided npm module, exports a js bundle via browserify, 
converts to ECMA 5.1 via babel and
     finally translates the generated JS bundle to Python via Js2Py.
@@ -139,7 +139,7 @@
     :param module_name: Name of the npm module to require. For example 
'esprima'. Supports specific versions via @
         specification. Eg: 'crypto-js@3.3'.
     :param include_polyfill: Whether the babel-polyfill should be included as 
part of the translation. May be needed
-    for some modules that use unsupported features.
+    for some modules that use unsupported features of JS6 such as Map or typed 
arrays.
     :param update: Whether to force update the translation. Otherwise uses a 
cached version if exists.
     :param context: Optional context in which the translated module should be 
executed in. If provided, the
         header (js2py imports) will be skipped as it is assumed that the 
context already has all the necessary imports.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Js2Py-0.68/setup.py new/Js2Py-0.70/setup.py
--- old/Js2Py-0.68/setup.py     2020-03-07 14:27:52.000000000 +0100
+++ new/Js2Py-0.70/setup.py     2020-04-11 11:57:16.000000000 +0200
@@ -27,7 +27,7 @@
 # twine upload dist/*
 setup(
     name='Js2Py',
-    version='0.68',
+    version='0.70',
 
     packages=['js2py', 'js2py.utils', 'js2py.prototypes', 'js2py.translators',
               'js2py.constructors', 'js2py.host', 'js2py.es6', 
'js2py.internals',


Reply via email to