zktop icon indicating copy to clipboard operation
zktop copied to clipboard

port to Python3

Open calestyo opened this issue 3 years ago • 3 comments

Hey.

As you've mentioned in #19 a port to Python3 will be necessary to keep zktop alive.

I'd guess it would run mostly out of the box with Python3, given that e.g. Debian's package of zktop already uses that.

So perhaps all needed is to change the shebang?!

Cheers, Chris.

calestyo avatar Dec 21 '21 02:12 calestyo

I think it will work fine if one has python installed (python 2 or 3) as "python". My thought was to continue to support py2 "if it just works" (and try not to break on purpose). My main ref on #19 (sorry to be ambiguous) was to remove references to python2 from the docs as "supported". Likely I would think change the docs to reflect python3 as the primary, and "hopefully" continues to work for those interested in py2. I hope we don't need to break b/w compat, although at some point we shouldn't be afraid to leverage py3 only features if that's a big win....

phunt avatar Dec 23 '21 00:12 phunt

No, I wouldn't break on purpose either. I'd also have just removed any references to Python2 as being supported, and especially also replaced the shebang line with a Python3 one.

I don't think you need to worry too much about Python2... any stable distribution shipping zktop that still has Python2 (only) would anyway continue to ship the old version of zktop... and any new ones will likely just have Python3.

And people who get it manually, could just go back in git an take the version that still works in Python2 - should there be ever incompatible changes.

calestyo avatar Jan 18 '22 22:01 calestyo

if it helps, with python3.11/3.12 I get:

DeprecationWarning: setName() is deprecated, set the name attribute instead

asarubbo avatar Jan 16 '24 13:01 asarubbo