-
Notifications
You must be signed in to change notification settings - Fork 79
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
Make hocr-tools fit for Python 3 #37
Comments
Was mostly implemented by #46, only step left is converting print statements. |
@kba, @zuphilip, FYI I'm not suggesting you to change anything. It's just a note... |
We could really just do the 2to3 print conversions, it won't break 2.7 and it will work out-of-the-box on systems with newer default python, like Arch Linux. |
Cf. UB-Mannheim@e5fbb83 . But I guess we should also update then the travis tests, because the conversion there is not anymore needed? |
Closed in #73 |
We should consider making the tools ready for Python 3. Not so much because 2.7 is going away soon (it will be officially developed until 2020) but because all the problems 2to3 reports are easily fixable, e.g. throwing strings is bad practice in all versions.
The changes to the standard libaries (e.g.
cStringIO
is nowio.StringIO
) make it tedious to use the same code for both versions (and it's generally not recommended). Instead, I propose that we fix the code problems 2to3 reports and ensure (by testing in CI) that the code can be automatically ported to Python 3 and run the tests. At some point in the future, we can then just run 2to3 for good.The text was updated successfully, but these errors were encountered: