-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Python 3 #163
Comments
Did quick patch on the boundaries of the network lib for compatibility with client, gets us forward for now. Network lib is oldest part, as it predates the project anyway. Biggest known problem left is the world wrap-around, looking at that next. Otherwise, we're pretty good??? Will investigate if we can run the existing unit tests from VS Code or not. |
Found the wrapping issue here in WorldMap: https://github.com/Mikeware/SpaceBattleArena/blob/py3/SBA_Serv/World/WorldMap.py#L222 The vector seems immutable now, but haven't found correct pattern yet. This is also a problem in the Warp command here: https://github.com/Mikeware/SpaceBattleArena/blob/py3/SBA_Serv/World/WorldCommands.py#L317 |
Hitting this same issue with py2exe, they've changed something, so need to find new paradigm, but not sure what it is. All info around pygame and py2exe seems old. |
Looks like py2exe is pretty old, seeing if cx_Freeze will work instead. |
Wow, division changed between Python 2 and 3 🙄 http://python-future.org/compatible_idioms.html#division I could only repro on the py3 branch (and not the master branch). I'm on Python 3.7.6 with dependencies from requirements.txt. Repro: Result: Crash
Log file: SBA_Serv2020-02-13_151646.log |
@jaredkrinke started a |
The Unit Tests seem to be mostly working, they seem to have trouble running all together, but run fine individually. Timing can still be an issue... that's a whole other problem. They've at least helped identify some issues with Py3 and PyMunk5, so it's been helpful. |
@jaredkrinke think I have a fix for the wormholewrapper I'm going to push in a minute. Found another issue that I'm not sure about yet though:
Happened when deleting stuff from the world in the Server GUI. |
FYI: I see that error every time I run the server (with no arguments). |
I see the problem. In PhysicalEllipse.__init__, the following division should have been left as a float division (in the py3 branch, it truncates to zero so all the points in the polygon end up being the same): def __init__(self, size, mass, pos, segments=16):
...
ang = math.pi * 2 // segments |
Ah, thanks @jaredkrinke! That's a recent change I did, I was over-aggressive on my changes back to int division. |
Plan:
Update to py2exe 0.9.2.2Switch to cx_Freeze 6.1 for packaging - 🟡 In ProgressOpen Issues:
Auxiliary:
Docs:
To Test:
Started in py3 branch
The text was updated successfully, but these errors were encountered: