Skip to content
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

Partial python3 support #506

Merged
merged 7 commits into from
Jan 21, 2020
Merged

Partial python3 support #506

merged 7 commits into from
Jan 21, 2020

Conversation

penguinolog
Copy link
Contributor

@penguinolog penguinolog commented Jan 21, 2020

Fix #472 #501

Fixed:

  • print usage
  • file operations (file is not supported anymore)
  • from math import *
  • mix of tabs and spaces
  • python 2.4- code has been removed. Check shown, that it is not used.
  • md5 import for python 3: use hashlib.md5
  • raising string (in python3 Exception should be used)
  • using backtick instead of repr
  • use from __future__ import division and // for integer division

Ported only code, which supports python 2.7
Several modules looks like should be just removed instead of fixing

Fixed:
* print usage
* file operations (`file` is not supported anymore)
* `from math import *`
* mix of tabs and spaces
pyx code not changed and makefile not adopted
* fix print and file operations
* md5 is not available in py3 -> use hashlib.md5
@penguinolog
Copy link
Contributor Author

3 CI builds was failed due to some error in PIP (tests was not started)

* This files are not compatible with python2.4 and was never updated. Search not shown usage of it.
division in python3 differs from python2 without __future__
`sys.stdout.write` in python3 do not accept bytes and `struct.pack` produce bytes
@marekjez86 marekjez86 merged commit e9bd761 into notofonts:master Jan 21, 2020
@penguinolog penguinolog deleted the partial_py3 branch January 21, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please consider to switch to python 3.x
2 participants