summarylogtreecommitdiffstats
path: root/patch-python3.12-bug1860051.patch
blob: 352dd5e2dc326e889a080d33f7d145a8c5d5fce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Bug 1860051 - Remove use of six in mainfestupdate, r=Sasha

Differential Revision: https://phabricator.services.mozilla.com/D191624

diff --git a/testing/web-platform/manifestupdate.py b/testing/web-platform/manifestupdate.py
--- a/testing/web-platform/manifestupdate.py
+++ b/testing/web-platform/manifestupdate.py
@@ -1,24 +1,23 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import argparse
+import configparser
 import errno
 import hashlib
 import os
 import sys
 
 import manifestdownload
-import six
 from mach.util import get_state_dir
 from mozfile import load_source
 from mozlog.structured import commandline
-from six.moves import configparser
 from wptrunner import wptcommandline
 
 manifest = None
 
 
 def do_delayed_imports(wpt_dir):
     global manifest
     load_source("localpaths", os.path.join(wpt_dir, "tests", "tools", "localpaths.py"))
@@ -108,17 +107,17 @@ def run(src_root, obj_root, logger=None,
     if not os.path.exists(config_path):
         logger.critical("Config file %s does not exist" % config_path)
         return None
 
     logger.debug("Using config path %s" % config_path)
 
     test_paths = wptcommandline.get_test_paths(wptcommandline.config.read(config_path))
 
-    for paths in six.itervalues(test_paths):
+    for paths in test_paths.values():
         if "manifest_path" not in paths:
             paths["manifest_path"] = os.path.join(
                 paths["metadata_path"], "MANIFEST.json"
             )
 
     ensure_manifest_directories(logger, test_paths)
 
     local_config = read_local_config(src_wpt_dir)
@@ -146,17 +145,17 @@ def run(src_root, obj_root, logger=None,
         rebuild=kwargs["rebuild"],
         cache_root=kwargs["cache_root"],
     )
 
     return manifests
 
 
 def ensure_manifest_directories(logger, test_paths):
-    for paths in six.itervalues(test_paths):
+    for paths in test_paths.values():
         manifest_dir = os.path.dirname(paths["manifest_path"])
         if not os.path.exists(manifest_dir):
             logger.info("Creating directory %s" % manifest_dir)
             # Even though we just checked the path doesn't exist, there's a chance
             # of race condition with another process or thread having created it in
             # between. This happens during tests.
             try:
                 os.makedirs(manifest_dir)
@@ -226,17 +225,17 @@ def load_and_update(
     test_paths,
     rebuild=False,
     config_dir=None,
     cache_root=None,
     update=True,
 ):
     rv = {}
     wptdir_hash = hashlib.sha256(os.path.abspath(wpt_dir).encode()).hexdigest()
-    for url_base, paths in six.iteritems(test_paths):
+    for url_base, paths in test_paths.items():
         manifest_path = paths["manifest_path"]
         this_cache_root = os.path.join(
             cache_root, wptdir_hash, os.path.dirname(paths["manifest_rel_path"])
         )
         m = manifest.manifest.load_and_update(
             paths["tests_path"],
             manifest_path,
             url_base,