Open MuuNU opened 4 years ago
In files:
\flexx\app\_app.py
\pscript\commonast.py
I found this lines:
from base64 import encodestring as encodebytes
from base64 import encodestring as encodebytes, decodestring as decodebytes
But in base64.py no encodestring/decodestring functions, because they was deleted in 3,9 branch of python
Please fix it, or add to documentation attention about flexx don`t work with 3,9 python
Looks like python 2.7 compatibility imports maybe. I guess they can just be replaced by
from base64 import encodebytes, decodebytes
edit: Just tried that, but looks like there is a little bit more work to do...
I renamed the title to reflect the bigger picture.
Looks like python 2.7 compatibility imports maybe. I guess they can just be replaced by
from base64 import encodebytes, decodebytes
edit: Just tried that, but looks like there is a little bit more work to do...
I did:
from base64 import encodebytes
and it worked with python 3.9.2 and flexx 0.8.1
Thanks! Yeah replacing these imports might be enough. We should also update CI to make sure the tests pass for py39 too.
I just installed flexx and the simplest example does not run because of this dusty bug. Can you please fix it in the next release? I'd like to use flexx for code that should run for many different users. We cannot expect everyone to change that line of code in the flexx package themselves ;-)
It has been fixed in master. But I have not created a new release yet. In part because I'd like to be sure that everything works on py3.9 (in CI). Ideally we'd also move CI from Travis to GH Actions ...
Anyway, you can pip install -U https://github.com/flexxui/flexx/archive/master.zip
to get the latest version
Not a proficient user of Flexx, but following some recent updates it seems to not work properly for me on Windows10 with conda-managed python 3.9(.10 or .12).
Similar results on several similarly-configured machines. Running the basic demo.py from flexxamples, it renders the "Starting Flexx App" title, but nothing else. First error reported in the browser console is:
Uncaught SyntaxError: missing ) after argument list flexx-core.js:1658
which appears to be a malformed call to the JS function $Loop._process_actions
In order to isolate, I started a fresh Windows Sandbox Win10 VM, installed a fresh mini-conda environment (Python 3.9.10) and created several child environments for various versions of Flexx.
I have not had time to investigate in further detail, for my limited purposes sticking with 0.8.2 is probably fine.
Thank you for the work you have been putting into this.
@tticknor Could you try updating pscript? The latest version is 0.7.7
This looks like #711, where the new pscript caused an error in Flexx, which needed a fix. Maybe a similar error is triggered with the new Flexx, but an old pscript ...
Using pscript 0.7.7 resolves the problem I noted above, all seems to work as expected.
Thank you for the suggestion and feedback.
Ah, that makes sense. I've stopped actively maintaining my conda recipes since binary wheels have become ubiquitous.
I tried to run example file and got this
$ pip list
$ python --version
Python 3.9.0