HomePhabricator

Begin making git-clang-format python3 compatible.

Description

Begin making git-clang-format python3 compatible.

This patch fixes most of the python3 incompatabilities
within git-clang-format while keeping the script python2 compatible.
There is still one remaining incompatability that prevents using Python3
which is the str vs byte type change. I plan to put those fixes
up for review separately.

This patch contains fixes for the following incompatabilities:

  1. Use the new style Python3 print function. This requires importing __future__.print_function.
  1. Fix incompatability between the Python3 octal prefix and the octal prefix Git uses.
  1. Replace use of dict.iteritems() with dict.viewitems() because iteritems() has been removed in Python3. viewitems() reviews python 2.7 but that is also what the script is documented as requiring.

Details

Committed
EricWFApr 20 2017, 2:05 PM
Parents
rL300890: make detect_leaks=1 the default for the lsan test suite
Branches
Unknown
Tags
Unknown