[py3] Run recipes.py under python3

Bug: 89307
Change-Id: I85558cd98955d54773026d526a708b9d9f1bdf05
Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/610622
Commit-Queue: Nathan Mulcahey <nmulcahey@google.com>
Reviewed-by: Oliver Newman <olivernewman@google.com>
diff --git a/recipe_modules/recipe_testing/__init__.py b/recipe_modules/recipe_testing/__init__.py
index 996500a..6a9b709 100644
--- a/recipe_modules/recipe_testing/__init__.py
+++ b/recipe_modules/recipe_testing/__init__.py
@@ -22,7 +22,6 @@
     "recipe_engine/path",
     "recipe_engine/properties",
     "recipe_engine/proto",
-    "recipe_engine/python",
     "recipe_engine/raw_io",
     "recipe_engine/step",
     "recipe_engine/swarming",
diff --git a/recipe_modules/recipe_testing/api.py b/recipe_modules/recipe_testing/api.py
index 69de038..b78aa27 100644
--- a/recipe_modules/recipe_testing/api.py
+++ b/recipe_modules/recipe_testing/api.py
@@ -292,13 +292,21 @@
         if allowlist:
             args.extend(["--allowlist", allowlist])
         with self.m.context(cwd=recipes_path):
-            self.m.python("lint", self.m.context.cwd.join("recipes.py"), args=args)
+            self.m.step(
+                "lint",
+                cmd=[self.m.context.cwd.join("recipes.py")] + args,
+            )
 
     def run_unit_tests(self, recipes_path):
         """Run the recipe unit tests."""
         with self.m.context(cwd=recipes_path):
-            self.m.python(
-                "test", self.m.context.cwd.join("recipes.py"), args=["test", "run"]
+            self.m.step(
+                "test",
+                cmd=[
+                    self.m.context.cwd.join("recipes.py"),
+                    "test",
+                    "run",
+                ],
             )
 
     def run_tests(
diff --git a/recipe_modules/recipe_testing/examples/full.expected/depth.json b/recipe_modules/recipe_testing/examples/full.expected/depth.json
index 3484cb3..6cfb3ed 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/depth.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/depth.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/fuchsia_recipe_unaffected.json b/recipe_modules/recipe_testing/examples/full.expected/fuchsia_recipe_unaffected.json
index 9259a70..e5c7898 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/fuchsia_recipe_unaffected.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/fuchsia_recipe_unaffected.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/no_build_old_build_ignored_build.json b/recipe_modules/recipe_testing/examples/full.expected/no_build_old_build_ignored_build.json
index f115753..a714edb 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/no_build_old_build_ignored_build.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/no_build_old_build_ignored_build.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/no_latest_cl.json b/recipe_modules/recipe_testing/examples/full.expected/no_latest_cl.json
index bb70e9e..6722fcb 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/no_latest_cl.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/no_latest_cl.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/recipe_proto.json b/recipe_modules/recipe_testing/examples/full.expected/recipe_proto.json
index 5fb65ba..91c60d0 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/recipe_proto.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/recipe_proto.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/recipes.json b/recipe_modules/recipe_testing/examples/full.expected/recipes.json
index 8548505..db06d7f 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/recipes.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/recipes.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/recipes_cfg.json b/recipe_modules/recipe_testing/examples/full.expected/recipes_cfg.json
index 8869d46..cb7a32e 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/recipes_cfg.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/recipes_cfg.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/recipes_with_buildbucket.json b/recipe_modules/recipe_testing/examples/full.expected/recipes_with_buildbucket.json
index fb830f9..ce125e4 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/recipes_with_buildbucket.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/recipes_with_buildbucket.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/recursive_ls.json b/recipe_modules/recipe_testing/examples/full.expected/recursive_ls.json
index 701dc7e..6fb210f 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/recursive_ls.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/recursive_ls.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/two_pass_one_skip.json b/recipe_modules/recipe_testing/examples/full.expected/two_pass_one_skip.json
index 68d8f28..b49abc4 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/two_pass_one_skip.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/two_pass_one_skip.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipe_modules/recipe_testing/examples/full.expected/with_buildbucket.json b/recipe_modules/recipe_testing/examples/full.expected/with_buildbucket.json
index 2694cc4..ed006cf 100644
--- a/recipe_modules/recipe_testing/examples/full.expected/with_buildbucket.json
+++ b/recipe_modules/recipe_testing/examples/full.expected/with_buildbucket.json
@@ -1,8 +1,6 @@
 [
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "lint",
       "--allowlist",
@@ -13,8 +11,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/recipe_path/recipes.py",
       "test",
       "run"
diff --git a/recipes/recipes.expected/cq_try.json b/recipes/recipes.expected/cq_try.json
index 89a06ef..5f81d4e 100644
--- a/recipes/recipes.expected/cq_try.json
+++ b/recipes/recipes.expected/cq_try.json
@@ -796,8 +796,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/infra/recipes/recipes.py",
       "lint",
       "--allowlist",
@@ -820,8 +818,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/infra/recipes/recipes.py",
       "test",
       "run"
diff --git a/recipes/recipes.expected/cq_try_restricted.json b/recipes/recipes.expected/cq_try_restricted.json
index 9d7105f..5479a98 100644
--- a/recipes/recipes.expected/cq_try_restricted.json
+++ b/recipes/recipes.expected/cq_try_restricted.json
@@ -796,8 +796,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/infra/recipes/recipes.py",
       "lint",
       "--allowlist",
@@ -820,8 +818,6 @@
   },
   {
     "cmd": [
-      "python",
-      "-u",
       "[START_DIR]/infra/recipes/recipes.py",
       "test",
       "run"