ROSE icon indicating copy to clipboard operation
ROSE copied to clipboard

Port to python 3

Open nirs opened this issue 7 years ago • 11 comments

Python 3 is the future of python - kids better learn python 3 at this point.

Check 2to3 tool: https://docs.python.org/2/library/2to3.html

nirs avatar Sep 11 '17 15:09 nirs

This is a tracker issue:

  • #190
  • #192

Moshe is working on this.

nirs avatar Oct 19 '17 18:10 nirs

I'd like to help with this, but looks like #190 & #192 are addressed. Ok if I address issues other than imports & print statements for the client as another issue?

pzelnip avatar Oct 20 '17 15:10 pzelnip

Sure @pzelnip . What other issues you had in mind ?

rollandf avatar Oct 20 '17 15:10 rollandf

@pzelnip I think we need want to move to python3 only - maintaining code that run on both 2 and 3 is a nightmare. I would start with the 2to3 tool and add manual fixes if needed.

nirs avatar Oct 20 '17 18:10 nirs

Literally anything else 2to3 reports as being problematic (iteritems vs items, etc).

Will take a stab at this in just a bit.

pzelnip avatar Oct 21 '17 02:10 pzelnip

Hmm, looks like the code has been dramatically refactored and now the only issues I see raised by 2to3 are the import & print statements, which would've been covered by #190 and #192 so now not sure if there is anything else to do for this.

pzelnip avatar Oct 21 '17 19:10 pzelnip

@pzelnip I suspect that there are issues with usage of strings/bytes in the networking code. Anyway, it is better to wait with this until we merge #190 and #192.

nirs avatar Oct 21 '17 21:10 nirs

@nirs What 2.x and 3.x versions are you planning to support?

rodxavier avatar Oct 31 '17 23:10 rodxavier

@rodxavier, I don't want to support both python 2 and 3, only python 3. Supporting current python 3 version should be good enough, or maybe last 2 versions (3.5, 3.6). People on older systems can use a container, see #173, #174.

nirs avatar Nov 01 '17 07:11 nirs

PR #323 fixed the game code. Slides still need to be updated.

rollandf avatar Jan 13 '20 07:01 rollandf

@sleviim is this still relevant?

nirs avatar Jul 23 '22 21:07 nirs