coldsweat icon indicating copy to clipboard operation
coldsweat copied to clipboard

Python3 compability

Open jannis-a opened this issue 7 years ago • 4 comments

Compability to Python3 would be nice. I already started on this (PR: #110)

jannis-a avatar Mar 23 '17 01:03 jannis-a

Thank you for your contribution! I have ignored Python 3 so far since I cannot test the code against it so I believe this should go on a separate branch for now. I'm assuming that every Coldsweat dependency (Peewee, Tempita, etc.) are Python 3 compatible. Is it the case?

Also, when new code will be added to master this should be ported to the Python 3 branch. Are you willing to keep this up to date?

passiomatic avatar Mar 25 '17 09:03 passiomatic

Well, I don't see the point of having two branches. The code still runs with Python 2 so this extra work would be pointless. The depencies are Python 3 compatible if I looked up everything right, only the Fever API und processors are not working right now - but haven't tracked the exact error yet.

There are Python packages which analyze your code so you can write your code for the master branch Python 2 & 3 compatible (take a look at "future").

jannis-a avatar Mar 25 '17 16:03 jannis-a

Maybe I missed it, but it looks like the input function is not defined for Python 2 (commands.py line 186). Possible fix:

try:
    input = raw_input
except:
    pass

the-south-well avatar Mar 27 '17 00:03 the-south-well

For those interested in Python3 - I have a working branch with some more fixes in here: https://github.com/oz123/coldsweat/tree/dev

oz123 avatar Sep 01 '19 09:09 oz123

I'm closing this since Python 3 port is now done on a dedicated branch and we are gonna delete much of the affected code anyway.

passiomatic avatar May 29 '23 16:05 passiomatic