Closed
Conversation
Member
|
This is a much welcome improvement, but IMHO it should wait until (if?) |
…ed python long type
Contributor
Author
|
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? |
Member
|
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 :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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