This is an archive of the discontinued LLVM Phabricator instance.

Use compatible print statements for Python2/3
ClosedPublic

Authored by serge-sans-paille on Mar 20 2019, 12:21 AM.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

davide added a subscriber: davide.Mar 20 2019, 7:40 AM

Thanks for your interest in the subject of Python! I converted everything I was able to find looking at our test suite, it seems that we lack coverage for these scripts.
Did you end up testing them with both py 2 and py 3 or just applied a tool on them?

@davide I first applied 2to3 systematically, then manually edited the diff so that it remains backward compatible with python2.

I didn't run the check-lldb target though, I'm doing that right now.

davide accepted this revision.Mar 21 2019, 8:18 AM

This looks good to me as long as it doesn't break check-lldb (and from I quick look at the patch I doubt it does). Thanks for helping with this!

This revision is now accepted and ready to land.Mar 21 2019, 8:18 AM

validates fine on my side with py3

@davide : is that ok if I add you to a few other python compat related reviews?

This revision was automatically updated to reflect the committed changes.