Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-flexx for openSUSE:Factory 
checked in at 2022-01-15 20:05:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flexx (Old)
 and      /work/SRC/openSUSE:Factory/.python-flexx.new.1892 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flexx"

Sat Jan 15 20:05:19 2022 rev:9 rq:946652 version:0.8.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-flexx/python-flexx.changes        
2021-10-16 22:47:47.680699727 +0200
+++ /work/SRC/openSUSE:Factory/.python-flexx.new.1892/python-flexx.changes      
2022-01-15 20:05:35.329777202 +0100
@@ -1,0 +2,7 @@
+Sat Jan 15 15:58:42 UTC 2022 - Dirk M??ller <[email protected]>
+
+- update to 0.8.3:
+  * Fixed a bug where with the latest PScript (0.7.6) 
+    Flexx wont start in the browser 
+
+-------------------------------------------------------------------

Old:
----
  flexx-0.8.2.tar.gz

New:
----
  flexx-0.8.3.tar.gz

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

Other differences:
------------------
++++++ python-flexx.spec ++++++
--- /var/tmp/diff_new_pack.WokdWh/_old  2022-01-15 20:05:38.349779556 +0100
+++ /var/tmp/diff_new_pack.WokdWh/_new  2022-01-15 20:05:38.357779562 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-flexx
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %define         skip_python2 1
 %define         skip_python36 1
 Name:           python-flexx
-Version:        0.8.2
+Version:        0.8.3
 Release:        0
 Summary:        Python toolkit for creating graphical user interfaces
 License:        BSD-2-Clause

++++++ flexx-0.8.2.tar.gz -> flexx-0.8.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/PKG-INFO new/flexx-0.8.3/PKG-INFO
--- old/flexx-0.8.2/PKG-INFO    2021-08-30 23:34:51.965775700 +0200
+++ new/flexx-0.8.3/PKG-INFO    2021-09-16 13:36:16.360899700 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: flexx
-Version: 0.8.2
+Version: 0.8.3
 Summary: Write desktop and web apps in pure Python.
 Home-page: https://flexx.readthedocs.io
 Author: Flexx contributors
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/README.md new/flexx-0.8.3/README.md
--- old/flexx-0.8.2/README.md   2021-08-30 23:27:12.000000000 +0200
+++ new/flexx-0.8.3/README.md   2021-09-02 10:57:34.000000000 +0200
@@ -1,7 +1,7 @@
 Flexx
 =====
 
-![CI](https://github.com/flexxui/flexx/workflows/CI/badge.svg)
+[![CI](https://github.com/flexxui/flexx/workflows/CI/badge.svg)](https://github.com/flexxui/flexx/actions)
 [![Documentation 
Status](https://readthedocs.org/projects/flexx/badge/?version=latest)](https://flexx.readthedocs.org)
 [![PyPI 
version](https://badge.fury.io/py/flexx.svg)](https://badge.fury.io/py/flexx)
 
@@ -32,8 +32,6 @@
 
 
[![demo](https://dl.dropboxusercontent.com/s/x4s7wgv6tpyqsqo/flexx_demo_300.png)](http://flexx.readthedocs.io/en/latest/examples/demo_src.html)
 
-There is a demo server at http://demo.flexx.app .
-
 
 Motivation
 ----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/docs/releasenotes.rst 
new/flexx-0.8.3/docs/releasenotes.rst
--- old/flexx-0.8.2/docs/releasenotes.rst       2021-08-30 23:30:57.000000000 
+0200
+++ new/flexx-0.8.3/docs/releasenotes.rst       2021-09-16 13:33:52.000000000 
+0200
@@ -2,6 +2,10 @@
 Release notes
 -------------
 
+**v0.8.3** (16-09-2021)
+
+* Fixed a bug where with the latest PScript (0.7.6) Flexx wont start in the 
browser.
+
 
 **v0.8.2** (30-08-2021)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/flexx/__init__.py 
new/flexx-0.8.3/flexx/__init__.py
--- old/flexx-0.8.2/flexx/__init__.py   2021-08-30 23:33:14.000000000 +0200
+++ new/flexx-0.8.3/flexx/__init__.py   2021-09-16 13:35:19.000000000 +0200
@@ -27,7 +27,7 @@
 # part after the "----" is stripped. The long-description for Pypi is
 # obtained by converting README.md to RST.
 
-__version__ = '0.8.2'
+__version__ = '0.8.3'
 
 # Assert compatibility
 import sys
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/flexx/app/_tornadoserver.py 
new/flexx-0.8.3/flexx/app/_tornadoserver.py
--- old/flexx-0.8.2/flexx/app/_tornadoserver.py 2021-08-30 23:24:49.000000000 
+0200
+++ new/flexx-0.8.3/flexx/app/_tornadoserver.py 2021-09-16 13:34:32.000000000 
+0200
@@ -333,7 +333,7 @@
         # Get asset provider: store or session
         asset_provider = assets
         if session_id and selector != 'data':
-            return self.write('Only supports shared assets, not ' % filename)
+            return self.write('Only supports shared assets, not %s' % filename)
         elif session_id:
             asset_provider = manager.get_session_by_id(session_id)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/flexx/event/_js.py 
new/flexx-0.8.3/flexx/event/_js.py
--- old/flexx-0.8.2/flexx/event/_js.py  2020-05-15 00:11:57.000000000 +0200
+++ new/flexx-0.8.3/flexx/event/_js.py  2021-09-16 13:34:32.000000000 +0200
@@ -14,7 +14,6 @@
 
 """
 
-import re
 import sys
 import json
 import inspect
@@ -396,22 +395,64 @@
         jscode = jscode.replace('REACTION_METHODS_HOOK', code)
     # Optimizations, e.g. remove threading lock context in Loop
     if PyClass is Loop:
-        p = r"this\._lock\.__enter.+?try {(.+?)} catch.+?else.+?exit__.+?}"
-        jscode= re.sub(p, r'{/* with lock */\1}', jscode, 0,
-                       re.MULTILINE | re.DOTALL)
-        jscode= re.sub(r'\$Loop\..+? = undefined;\n', r'', jscode, 0,
-                       re.MULTILINE | re.DOTALL)
-        jscode = jscode.replace('this._ensure_thread_', 
'//this._ensure_thread_')
-        jscode = jscode.replace('threading.get_ident()', '0')
-        jscode = jscode.replace('._local.', '.')
-        jscode = jscode.replace('this._thread_match(true);\n', '')
-        jscode = jscode.replace('if 
(_pyfunc_truthy(this._thread_match(false)))', '')
+        jscode = _clean_code_of_thread_stuff(jscode)
     # Almost done
     jscode = jscode.replace('new Dict()', '{}').replace('new Dict(', 
'_pyfunc_dict(')
     mc.meta['std_functions'].add('dict')
     return mc.attach_meta(jscode)
 
 
+def _clean_code_of_thread_stuff(code):
+    """ Helper function to remove stuff that won't work in JS.
+    """
+    # This code used regexes first, but that makes it fragile.
+    # See https://github.com/flexxui/flexx/issues/709
+
+    # First take out only the try-block of the with-statement for the thread
+    parts = []
+    i = iend = 0
+    while True:
+        i0 = code.find("this._lock.__enter__", i)
+        if i0 < 0:
+            break
+        i = code.find("try {", i0)
+        i, sub = _exit_scope(code, i)
+        i = code.find("finally {", i)
+        i, _ = _exit_scope(code, i)
+        parts.append(code[iend:i0])
+        parts.append("/* with lock */\n")
+        parts.append(sub)
+        iend = i
+    parts.append(code[iend:])
+    jscode = "".join(parts)
+
+    # Some final tweaks
+    jscode = jscode.replace('this._ensure_thread_', '//this._ensure_thread_')
+    jscode = jscode.replace('threading.get_ident()', '0')
+    jscode = jscode.replace('._local.', '.')
+    jscode = jscode.replace('this._thread_match(true);\n', '')
+    jscode = jscode.replace('if (_pyfunc_truthy(this._thread_match(false)))', 
'')
+    jscode = jscode.replace('this._thread_match', '(function() { return 
true})')
+
+    return jscode
+
+
+def _exit_scope(code, i):
+    level = 0
+    istart = i
+    while i < len(code):
+        if code[i] == "{":
+            level += 1
+            if level == 1:
+                istart = i + 1
+        elif code[i] == "}":
+            level -= 1
+            if level == 0:
+                return i + 1, code[istart:i]
+        i += 1
+    raise RuntimeError("Should not happen")
+
+
 def create_js_component_class(cls, cls_name, base_class='Component.prototype'):
     """ Create the JS equivalent of a subclass of the Component class.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/flexx/event/both_tester.py 
new/flexx-0.8.3/flexx/event/both_tester.py
--- old/flexx-0.8.2/flexx/event/both_tester.py  2021-08-30 23:24:49.000000000 
+0200
+++ new/flexx-0.8.3/flexx/event/both_tester.py  2021-09-02 11:24:57.000000000 
+0200
@@ -224,6 +224,8 @@
                 pyresult = call_func_in_py(func)
                 pyresult = pyresult.replace('"', "'").replace("\\'", "'")
                 pyresult = pyresult.split('!!!!')[-1]
+                # Remove "Cleared N old pending sessions"
+                pyresult = pyresult.split("old pending sessions\n")[-1]
                 #print('Py:\n' + pyresult)
             # Run in JS
             if js:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flexx-0.8.2/flexx.egg-info/PKG-INFO 
new/flexx-0.8.3/flexx.egg-info/PKG-INFO
--- old/flexx-0.8.2/flexx.egg-info/PKG-INFO     2021-08-30 23:34:51.000000000 
+0200
+++ new/flexx-0.8.3/flexx.egg-info/PKG-INFO     2021-09-16 13:36:14.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: flexx
-Version: 0.8.2
+Version: 0.8.3
 Summary: Write desktop and web apps in pure Python.
 Home-page: https://flexx.readthedocs.io
 Author: Flexx contributors

Reply via email to