summaryrefslogtreecommitdiff
path: root/build-python-1.patch
blob: 580fcaec156ea14d373297e631765df6f22ec837 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py
--- a/python/mach/mach/config.py
+++ b/python/mach/mach/config.py
@@ -17,6 +17,7 @@
 from __future__ import absolute_import, unicode_literals
 
 import collections
+import collections.abc
 import os
 import sys
 import six
@@ -146,7 +147,7 @@
     return _
 
 
-class ConfigSettings(collections.Mapping):
+class ConfigSettings(collections.abc.Mapping):
     """Interface for configuration settings.
 
     This is the main interface to the configuration.
@@ -192,7 +193,7 @@
     will result in exceptions being raised.
     """
 
-    class ConfigSection(collections.MutableMapping, object):
+    class ConfigSection(collections.abc.MutableMapping, object):
         """Represents an individual config section."""
 
         def __init__(self, config, name, settings):
@@ -317,13 +318,7 @@
         self._config.write(fh)
 
     @classmethod
-    def _format_metadata(
-        cls,
-        type_cls,
-        description,
-        default=DefaultValue,
-        extra=None,
-    ):
+    def _format_metadata(cls, type_cls, description, default=DefaultValue, extra=None):
         """Formats and returns the metadata for a setting.
 
         Each setting must have:
@@ -344,10 +339,7 @@
         if isinstance(type_cls, string_types):
             type_cls = TYPE_CLASSES[type_cls]
 
-        meta = {
-            "description": description,
-            "type_cls": type_cls,
-        }
+        meta = {"description": description, "type_cls": type_cls}
 
         if default != DefaultValue:
             meta["default"] = default
diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py
--- a/python/mach/mach/decorators.py
+++ b/python/mach/mach/decorators.py
@@ -6,6 +6,7 @@
 
 import argparse
 import collections
+import collections.abc
 
 from .base import MachError
 from .registrar import Registrar
@@ -151,7 +152,7 @@
             + "of functions. Found %s instead."
         )
 
-        if not isinstance(command.conditions, collections.Iterable):
+        if not isinstance(command.conditions, collections.abc.Iterable):
             msg = msg % (command.name, type(command.conditions))
             raise MachError(msg)
 
diff --git a/python/mach/mach/main.py b/python/mach/mach/main.py
--- a/python/mach/mach/main.py
+++ b/python/mach/mach/main.py
@@ -16,7 +16,7 @@
 import sys
 import traceback
 import uuid
-from collections import Iterable
+from collections.abc import Iterable
 
 from six import string_types
 
@@ -34,10 +34,7 @@
 from .logging import LoggingManager
 from .registrar import Registrar
 from .sentry import register_sentry, NoopErrorReporter
-from .telemetry import (
-    report_invocation_metrics,
-    create_telemetry_from_environment,
-)
+from .telemetry import report_invocation_metrics, create_telemetry_from_environment
 from .util import setenv, UserError
 
 SUGGEST_MACH_BUSTED_TEMPLATE = r"""
diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py
--- a/python/mozbuild/mozbuild/backend/configenvironment.py
+++ b/python/mozbuild/mozbuild/backend/configenvironment.py
@@ -9,7 +9,8 @@
 import sys
 import json
 
-from collections import Iterable, OrderedDict
+from collections.abc import Iterable
+from collections import OrderedDict
 from types import ModuleType
 
 import mozpack.path as mozpath
@@ -62,10 +63,7 @@
                     compile(source, path, "exec", dont_inherit=1),
                 )
 
-        g = {
-            "__builtins__": __builtins__,
-            "__file__": path,
-        }
+        g = {"__builtins__": __builtins__, "__file__": path}
         l = {}
         try:
             exec(code_cache[path][1], g, l)
diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py
--- a/python/mozbuild/mozbuild/makeutil.py
+++ b/python/mozbuild/mozbuild/makeutil.py
@@ -7,7 +7,7 @@
 import os
 import re
 import six
-from collections import Iterable
+from collections.abc import Iterable
 
 
 class Makefile(object):
diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
--- a/python/mozbuild/mozbuild/util.py
+++ b/python/mozbuild/mozbuild/util.py
@@ -9,6 +9,7 @@
 
 import argparse
 import collections
+import collections.abc
 import ctypes
 import difflib
 import errno
@@ -809,7 +810,7 @@
         self._strings = StrictOrderingOnAppendList()
         self._children = {}
 
-    class StringListAdaptor(collections.Sequence):
+    class StringListAdaptor(collections.abc.Sequence):
         def __init__(self, hsl):
             self._hsl = hsl
 
diff --git a/taskcluster/taskgraph/util/schema.py b/taskcluster/taskgraph/util/schema.py
--- a/taskcluster/taskgraph/util/schema.py
+++ b/taskcluster/taskgraph/util/schema.py
@@ -7,6 +7,7 @@
 import re
 import pprint
 import collections
+import collections.abc
 import voluptuous
 
 from six import text_type, iteritems
@@ -190,7 +191,7 @@
                     )
                 )
 
-        if isinstance(sch, collections.Mapping):
+        if isinstance(sch, collections.abc.Mapping):
             for k, v in iteritems(sch):
                 child = "{}[{!r}]".format(path, k)
                 check_identifier(child, k)
diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py
--- a/testing/mozbase/manifestparser/manifestparser/filters.py
+++ b/testing/mozbase/manifestparser/manifestparser/filters.py
@@ -12,7 +12,8 @@
 
 import itertools
 import os
-from collections import defaultdict, MutableSequence
+from collections import defaultdict
+from collections.abc import MutableSequence
 
 import six
 from six import string_types
diff --git a/third_party/python/gyp/pylib/gyp/common.py b/third_party/python/gyp/pylib/gyp/common.py
--- a/third_party/python/gyp/pylib/gyp/common.py
+++ b/third_party/python/gyp/pylib/gyp/common.py
@@ -5,6 +5,7 @@
 from __future__ import with_statement
 
 import collections
+import collections.abc
 import errno
 import filecmp
 import os.path
@@ -494,7 +495,7 @@
 
 
 # Based on http://code.activestate.com/recipes/576694/.
-class OrderedSet(collections.MutableSet):
+class OrderedSet(collections.abc.MutableSet):
   def __init__(self, iterable=None):
     self.end = end = []
     end += [None, end, end]         # sentinel node for doubly linked list

bgstack15