]>
Commit | Line | Data |
---|---|---|
811d1ba0 JP |
1 | |
2 | # HG changeset patch | |
3 | # User Emilio Cobos Álvarez <emilio@crisal.io> | |
4 | # Date 1625585189 0 | |
5 | # Node ID 2418633d529c6df00a83e973295eed0e891990a6 | |
6 | # Parent 0b5bfe85b344b34894f72176099da78c3849b5cc | |
7 | Bug 1719144 - Fix various imports for Python 3.10. r=firefox-build-system-reviewers,mhentges | |
8 | ||
9 | These are enough for me to run bootstrap+configure+build. | |
10 | ||
11 | Some touch third-party code (gyp), but per discussion in the earlier | |
12 | versions of this revision that seems fine. | |
13 | ||
14 | Differential Revision: https://phabricator.services.mozilla.com/D119080 | |
15 | ||
16 | diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py | |
17 | --- a/python/mozbuild/mozbuild/backend/configenvironment.py | |
18 | +++ b/python/mozbuild/mozbuild/backend/configenvironment.py | |
19 | @@ -4,17 +4,18 @@ | |
20 | ||
21 | from __future__ import absolute_import, print_function | |
22 | ||
23 | import os | |
24 | import six | |
25 | import sys | |
26 | import json | |
27 | ||
28 | -from collections import Iterable, OrderedDict | |
29 | +from collections.abc import Iterable | |
30 | +from collections import OrderedDict | |
31 | from types import ModuleType | |
32 | ||
33 | import mozpack.path as mozpath | |
34 | ||
35 | from mozbuild.util import ( | |
36 | FileAvoidWrite, | |
37 | memoized_property, | |
38 | ReadOnlyDict, | |
39 | diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py | |
40 | --- a/python/mozbuild/mozbuild/makeutil.py | |
41 | +++ b/python/mozbuild/mozbuild/makeutil.py | |
42 | @@ -2,17 +2,17 @@ | |
43 | # License, v. 2.0. If a copy of the MPL was not distributed with this | |
44 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
45 | ||
46 | from __future__ import absolute_import, print_function, unicode_literals | |
47 | ||
48 | import os | |
49 | import re | |
50 | import six | |
51 | -from collections import Iterable | |
52 | +from collections.abc import Iterable | |
53 | ||
54 | ||
55 | class Makefile(object): | |
56 | '''Provides an interface for writing simple makefiles | |
57 | ||
58 | Instances of this class are created, populated with rules, then | |
59 | written. | |
60 | ''' | |
61 | diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py | |
62 | --- a/python/mozbuild/mozbuild/util.py | |
63 | +++ b/python/mozbuild/mozbuild/util.py | |
64 | @@ -804,17 +805,17 @@ class HierarchicalStringList(object): | |
65 | __slots__ = ('_strings', '_children') | |
66 | ||
67 | def __init__(self): | |
68 | # Please change ContextDerivedTypedHierarchicalStringList in context.py | |
69 | # if you make changes here. | |
70 | self._strings = StrictOrderingOnAppendList() | |
71 | self._children = {} | |
72 | ||
73 | - class StringListAdaptor(collections.Sequence): | |
74 | + class StringListAdaptor(collections.abc.Sequence): | |
75 | def __init__(self, hsl): | |
76 | self._hsl = hsl | |
77 | ||
78 | def __getitem__(self, index): | |
79 | return self._hsl._strings[index] | |
80 | ||
81 | def __len__(self): | |
82 | return len(self._hsl._strings) | |
83 | diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py | |
84 | --- a/testing/mozbase/manifestparser/manifestparser/filters.py | |
85 | +++ b/testing/mozbase/manifestparser/manifestparser/filters.py | |
86 | @@ -7,17 +7,18 @@ A filter is a callable that accepts an i | |
87 | dictionary of values, and returns a new iterable of test objects. It is | |
88 | possible to define custom filters if the built-in ones are not enough. | |
89 | """ | |
90 | ||
91 | from __future__ import absolute_import | |
92 | ||
93 | import itertools | |
94 | import os | |
95 | -from collections import defaultdict, MutableSequence | |
96 | +from collections import defaultdict | |
97 | +from collections.abc import MutableSequence | |
98 | ||
99 | import six | |
100 | from six import string_types | |
101 | ||
102 | from .expression import ( | |
103 | parse, | |
104 | ParseError, | |
105 | ) |