Conversation
|
This is a much welcome improvement, but IMHO it should wait until (if?) |
…ed python long type
|
I don't use debian myself, but: https://pypi.python.org/pypi/Pygame/1.9.3 shows py35 and 36 Is there something wrong in those packages? You want to wait until it hits debian (un)stable? |
|
The singularity game is now running on python3. While we did not merge this branch as it was, we did cherry-pick several commits from it and it was also very valuable as a reference for issues seen in the code base. Many thanks to @rardiol :) |
A python 2/3 compatible Singularity, using future. Please note the end result wasn't extensively tested yet.
First the setuptools update from the other PR, then some general improvements needed for the porting, then making the game run with future on py2, then some extra fixes and changes.
I'm sure at least something broke save game compatibility, so I bumped version. 9c9c97c
A proper refactoring for the use of bisect for handlers is probably necessary. Old one broke because py3 removed method comparison, right now it just sorts normally. 5428ed7
I've had some trouble with the relative circular imports, so there's a lot of absolutely imported singularity.code.g.foo around the code now. d7081e1
By running "python2 -3", I found a few cases of floor division, and made those explicit. However I'm not 100% sure they're supposed to always be floor. All others divisions became future's olddiv (= py2's /). A lot of those are clearly supposed to be float. f591ccf and 079caf8
In addition to division, some of the automatically done changes may be done in a better way with py3 style code, with iterators and so on.
I unbundled polib because I don't like bundling, it was out of date and pip is supposed to make installing deps trivial. I can revert if desired.
pygame is not on pypi yet, and 1.9.1 is py2 only. If you want to test you need to download a pre-release of 1.9.2 from their repository https://bitbucket.org/pygame/pygame/downloads