Closed innir closed 4 years ago
The webserver on the runtime is simple to port, as I wrote it thinking about Py3. The problem is with the Editor. Its codebase is quite old and rely on old libraries. If I port the runtime to Py3, it might generate incompatibilities on systems that need to run the Editor in Py2 at the same machine. That being said, feel free to create the PR. Just make sure that all the dependencies on the installer (background_installer.sh) are changed appropriately. Thanks!
On Wed, Nov 20, 2019 at 2:55 AM Philip Rinn notifications@github.com wrote:
Hi,
it seems to be quite trivial to port OpenPLC to Python3. I ran 2to3 and there where only some brackets added to print statements and the like. The only real changes to be made where removing lines
https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/webserver.py#L2183-L2184 as Python3 is UTF-8 anyway. Should I create a PR?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thiagoralves/OpenPLC_v3/issues/99?email_source=notifications&email_token=AB63XPGKOYET3GALK7YSGEDQUTUOJA5CNFSM4JPOXNO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H2UR2BA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB63XPEDRE3HISY5HUK4NEDQUTUOJANCNFSM4JPOXNOQ .
@thiagoralves I created a PR against the development branch now: https://github.com/thiagoralves/OpenPLC_v3/pull/100.
I don't think using Python 3 for the runtime does any harm for the editor, even if run on the same machine as the don't directly exchange Python data structures.
@thiagoralves Sorry, the PR was not complete :-(
In Python 3 socket.send
accepts only bytes and subprocess.Popen
seems to behave differently as well.
I'll follow up with a new PR
This should do the trick: #102
@innir I think this is now merged. Can you confirm so that this can be closed?
Hi,
it seems to be quite trivial to port OpenPLC to Python3. I ran
2to3
and there where only some brackets added toprint
statements and the like. The only real changes to be made where removing lines https://github.com/thiagoralves/OpenPLC_v3/blob/master/webserver/webserver.py#L2183-L2184 as Python3 is UTF-8 anyway. Should I create a PR?