awwad / uptane

Uptane, security framework for automotive updates
https://uptane.github.io/
MIT License
10 stars 42 forks source link

Ensure Python 2.7 compliance - fix #13 #23

Closed lukpueh closed 7 years ago

lukpueh commented 7 years ago

This is a rather huge PR but it has a lot of similar changes all over the place. The changes are thematically grouped in separate commits:

Tested on Python 2.7.10 and Python 3.5.1 using demo.

Note on __future__: Python's migration guide recommends to always add a certain set of __future__ import satements to new Python modules. I only added them where needed. Please keep in mind that they might need to be added as the code changes.

awwad commented 7 years ago

Long term, I don't want to add the canonicaljson lib as a dependency, so I'm going to update the code that generates JSON to produce canonical json. TUF does something similar (You can find it here in tuf/client/repository_lib.py).

For now, I'll just use canonicaljson as added in this PR.