Python 2to3: Difference between revisions
No edit summary |
|||
| Line 128: | Line 128: | ||
: Sugar and the components lack in testing mechanisms and scripts. Our current test coverage is very basic and minimal. Improving the same is critical and the best time would be to so while Porting and testing the components | : Sugar and the components lack in testing mechanisms and scripts. Our current test coverage is very basic and minimal. Improving the same is critical and the best time would be to so while Porting and testing the components | ||
: Some test scripts are here - https://github.com/Pro-Panda/sugar-python3-tests | : Some test scripts are here - https://github.com/Pro-Panda/sugar-python3-tests | ||
== Notes == | |||
* httplib.HTTP is not available in Python 2; use http.client.HTTPConnection instead | |||
* cmp function does not exist in Python 3, use the cmp_to_key function; see https://docs.python.org/3/howto/sorting.html#sortinghowto | |||
* list.sort function requires named parameters in Python 3 | |||
* hashlib.md5 requires bytes as an argument in Python 3 | |||
* sha_hash.update requires bytes as an argument in Python 3 | |||
* statvfs does not exist in Python 3, verify the Python 2 constant values and use them instead | |||