Remove unneeded unittest2 compatibility import.
Stop using more deprecated test methods.
Fix unclosed file ResourceWarnings.
Check for bytes rather than str.
Use bytes literals instead of string literals.
Use six.moves.
Apply libmodernize.fixes.fix_dict.

(Exclude dulwich.objects)
Use six.byte2int, .indexbytes, and .iterbytes.
Fix PackBasedObjectStore.packs.
String stuff (It's late.)
stuff