Transition to Python 3.x#191
Conversation
buildPy2exe.py
Outdated
| CreateShortCut "$$SMPROGRAMS\Syncplay\Syncplay Server.lnk" "$$INSTDIR\syncplayServer.exe" "" | ||
| CreateShortCut "$$SMPROGRAMS\Syncplay\Uninstall.lnk" "$$INSTDIR\Uninstall.exe" "" | ||
| WriteINIStr "$$SMPROGRAMS\Syncplay\SyncplayWebsite.url" "InternetShortcut" "URL" "https://syncplay.pl" | ||
| WriteINIStr "$$SMPROGRAMS\Syncplay\SyncplayWebsite.url" "InternetShortcut" "URL" "http://syncplay.pl" |
There was a problem hiding this comment.
Is there a reason why this was changed to http?
There was a problem hiding this comment.
EDIT: fixed. I was looking at the wrong URL, my bad. Thanks for spotting this.
| def prepareInstallListTemplate(self, fileList): | ||
| create = [] | ||
| for dir_ in fileList.iterkeys(): | ||
| for dir_ in fileList.keys(): |
There was a problem hiding this comment.
In python3 dictionary iteration, it's often better to use for key in dict rather than for key in dict.keys(). dict.keys() returns a list rather than a generator-like object, which for key in dict does.
There was a problem hiding this comment.
I retract my statement. It's essentially the same. I think dict in keys is still faster in most cases.
There was a problem hiding this comment.
Lot of these changes were done by 2to3. If you want, I can edit this one, but I guess the same issue will appear in multiple other parts of the codebase. If you think these could cause potential problems, I can scroll all the changes and apply the same fix everywhere.
There was a problem hiding this comment.
I see. Yeah there's a lot of places that could be improved with shorter notation, but they're not necessarily "wrong".
I think I'll just ignore them for now, and there can be another PR that cleans up the code.
syncplay/vendor/Qt.py
Outdated
| """ | ||
|
|
||
| assert isinstance(ptr, long), "Argument 'ptr' must be of type <long>" | ||
| assert isinstance(ptr, int), "Argument 'ptr' must be of type <long>" |
There was a problem hiding this comment.
Comment should be int and not long right?
|
@xNinjaKittyx Is everything okay now? |
|
@Et0h yeah |
Following the discussion of issue #169, this PR ports all the codebase to Python 3.x on all the platforms.
A few info and caveats:
Thanks to @Et0h and @xNinjaKittyx for their assistance and support during the port.