Fix repos.py to work under Python 3
Created by: ssssam
This is just a matter of handling the bits of the stdlib that have different names in Python 3.
Building with Python 3 still doesn't work because of some code that tries to do 'dict1.items() + dict2.items()'. I think that's the only remaining blocker.