Initial work to drop Python 2 support#17
Open
pabloyoyoista wants to merge 18 commits intoexaxorg:masterfrom
Open
Initial work to drop Python 2 support#17pabloyoyoista wants to merge 18 commits intoexaxorg:masterfrom
pabloyoyoista wants to merge 18 commits intoexaxorg:masterfrom
Conversation
0125b48 to
e6257b9
Compare
e6257b9 to
618ab69
Compare
Collaborator
Author
|
Last commits fix #9 but should probably get more testing. I'm happy if we can start using this internally if that is wished |
This is legacy from when Python (<2) was dumber. There's no need to keep that now. And everywhere where long was being used "int" was also used, making it completely pointless. The definition in compat is kept for backwards compatibility.
This is legacy from when in Python 2 builtins.open was different to io.open. Python 3 open is right straight away, so there is no need to importing it from compat.
This is only for Python 2 compatibility, which we no longer need. We can use the built-in without risk.
This is legacy from when Python (<2) was dumber. There's no need to keep that now. The definition in compat is kept for backwards compatibility.
All those used: division, absolute_import, print_function, unicode_literals are mandatory since Python 3.0. Given we support only from 3.6, removing these imports is a nice cleanup to reduce code clutter with things that are unnecessary.
This reverts commit 4e7fb26.
This has been done automatically using flynt: https://github.com/ikamensh/flynt
This has been done automatically using flynt: https://github.com/ikamensh/flynt It is using aggressive mode with some later fixups to fix issues.
It's shorter and more readable
Uses across functions keep using strings, but at least simplifies uses within functions
f2447aa to
93247f9
Compare
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.
There are surely a lot more cleanups that can be done, but this is a start
Fixes #8