api: migrate to python3 only [reland]

Convert all the API modules to require Python 3.6.  These only get
imported by two programs, and we've migrated those to Python 3.6.
We omit chromite.api.gen for now because that is widely imported
by other programs that still support Python 2.

We fixed the breakage in the service layer so we can reland this.

BUG=chromium:997354, chromium:1052524
TEST=`./run_tests` passes

Change-Id: Ia0bdfd8740bd82f3b16ed8955ac0c4e3e8128bf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2058045
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/api/compile_build_api_proto.py b/api/compile_build_api_proto.py
index 7fc2dbc..8a58362 100644
--- a/api/compile_build_api_proto.py
+++ b/api/compile_build_api_proto.py
@@ -11,6 +11,7 @@
 from __future__ import print_function
 
 import os
+import sys
 
 from chromite.lib import commandline
 from chromite.lib import constants
@@ -18,6 +19,10 @@
 from chromite.lib import cros_logging as logging
 from chromite.lib import osutils
 
+
+assert sys.version_info >= (3, 6), 'This module requires Python 3.6+'
+
+
 _API_DIR = os.path.join(constants.CHROMITE_DIR, 'api')
 _CIPD_ROOT = os.path.join(constants.CHROMITE_DIR, '.cipd_bin')
 _PROTOC = os.path.join(_CIPD_ROOT, 'protoc')