more py3k fixes

this time in the babel_integration branch

includes a merge of master → babel_integration