[CRIU] [PATCH 0/2] RFC: python2/3 unification

Kir Kolyshkin kolyshkin at gmail.com
Fri May 3 18:28:35 MSK 2019


This makes all the Python code we have working
equally good with either python2 or python3.
I guess that some recent version of python2
is required (2.7?), but I am definitely not
an expert here, thus the RFC.

This was initially done manually, but when I found this tool
called futurize, so 99% of this is auto-generated.


Kir Kolyshkin (2):
  python: futurize
  crit: use whatever python version is default

 .gitignore                         |  1 -
 Makefile                           | 17 ++-----
 coredump/criu_coredump/__init__.py |  5 +-
 coredump/criu_coredump/coredump.py | 30 +++++++-----
 coredump/criu_coredump/elf.py      |  4 +-
 crit/Makefile                      | 13 -----
 lib/py/cli.py => crit/crit         |  6 ++-
 crit/crit-python2                  |  6 ---
 crit/crit-python3                  |  6 ---
 lib/py/criu.py                     |  6 ++-
 lib/py/images/images.py            | 20 ++++----
 lib/py/images/pb2dict.py           |  4 +-
 scripts/magic-gen.py               |  2 +
 soccr/test/run.py                  |  5 +-
 test/check_actions.py              |  1 +
 test/crit-recode.py                |  1 +
 test/exhaustive/pipe.py            |  4 +-
 test/exhaustive/unix.py            | 22 +++++----
 test/inhfd/pipe.py                 |  1 +
 test/inhfd/tty.py                  |  1 +
 test/others/ext-tty/run.py         |  2 +
 test/others/mounts/mounts.py       |  2 +
 test/others/rpc/config_file.py     |  1 +
 test/others/rpc/errno.py           |  5 +-
 test/others/rpc/ps_test.py         |  1 +
 test/others/rpc/restore-loop.py    |  1 +
 test/others/rpc/test.py            |  1 +
 test/others/rpc/version.py         |  1 +
 test/others/shell-job/run.py       |  4 +-
 test/zdtm.py                       | 77 ++++++++++++++----------------
 30 files changed, 127 insertions(+), 123 deletions(-)
 delete mode 100644 crit/Makefile
 rename lib/py/cli.py => crit/crit (98%)
 delete mode 100755 crit/crit-python2
 delete mode 100755 crit/crit-python3

-- 
2.17.1



More information about the CRIU mailing list