This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: use Python 3 module names
ClosedPublic

Authored by thopre on Sep 20 2019, 1:41 AM.

Details

Summary

Adapt imports to use Python 3 module names by installing them as
aliases. Due to the clear separation between text and binary data in
Python 3, this also requires changing all I/O in profilev2impl to be
binary I/O with encoding/decoding for text and some adaptation to the
integer to ULEB conversion code. Installing aliases was produced by
running futurize's stage2 libfuturize.fixes.fix_future_standard_library
and further edited by hand to adapt that I/O code.

Event Timeline

thopre created this revision.Sep 20 2019, 1:41 AM
thopre updated this revision to Diff 224309.Oct 10 2019, 4:19 AM
  • Fix module name in global statement
  • Rebase on top of global import fix
thopre updated this revision to Diff 232278.Dec 5 2019, 1:50 AM

Rebase later in the patch series

PrzemekWirkus added inline comments.Dec 5 2019, 7:17 AM
lnt/lnttool/admin.py
10–16

This idiom was discussed in other patch, let us know how you will sort this thing out please Thomas.

thopre updated this revision to Diff 232347.Dec 5 2019, 7:47 AM

Rebase on top of latest changes in earlier patches

thopre marked an inline comment as done.Dec 5 2019, 7:48 AM
This revision is now accepted and ready to land.Dec 10 2019, 2:57 AM
thopre updated this revision to Diff 233043.Dec 10 2019, 4:03 AM

Rebase earlier in patch series

thopre closed this revision.Dec 10 2019, 4:04 AM