apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
484 stars 136 forks source link

Modernize Python 2 code to get ready for Python 3 #501

Closed cclauss closed 5 years ago

cclauss commented 6 years ago

Make the minimal, safe changes required to convert the repo's code to be syntax compatible with both Python 2 and Python 3. There will definitely be more work required to complete the port to Python 3 but this is a minimal, safe first step.

Run: futurize --stage1 -w **/*.py # done in zsh for ** globbing

See Stage 1: "safe" fixes http://python-future.org/automatic_conversion.html#stage-1-safe-fixes

$ pip install future $ git checkout -b modernize-python2-code $ futurize --stage1 -w **/*.py # done in zsh for ** globbing $ git commit --all -m "Modernize Python 2 code to get ready for Python 3" $ git push --set-upstream origin modernize-python2-code

dreness commented 6 years ago

Probably need to have the tests passing before this can be merged... For details see https://travis-ci.org/apple/ccs-calendarserver/builds/278927382