]> git.pld-linux.org Git - packages/mozjs78.git/blobdiff - python3.10.patch
upstream fixes for python 3.10 (stripped down and adjusted for 78.*)
[packages/mozjs78.git] / python3.10.patch
diff --git a/python3.10.patch b/python3.10.patch
new file mode 100644 (file)
index 0000000..7f28753
--- /dev/null
@@ -0,0 +1,105 @@
+
+# HG changeset patch
+# User Emilio Cobos Álvarez <emilio@crisal.io>
+# Date 1625585189 0
+# Node ID 2418633d529c6df00a83e973295eed0e891990a6
+# Parent  0b5bfe85b344b34894f72176099da78c3849b5cc
+Bug 1719144 - Fix various imports for Python 3.10. r=firefox-build-system-reviewers,mhentges
+
+These are enough for me to run bootstrap+configure+build.
+
+Some touch third-party code (gyp), but per discussion in the earlier
+versions of this revision that seems fine.
+
+Differential Revision: https://phabricator.services.mozilla.com/D119080
+
+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
+@@ -4,17 +4,18 @@
+ from __future__ import absolute_import, print_function
+ import os
+ import six
+ 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
+ from mozbuild.util import (
+     FileAvoidWrite,
+     memoized_property,
+     ReadOnlyDict,
+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
+@@ -2,17 +2,17 @@
+ # 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/.
+ from __future__ import absolute_import, print_function, unicode_literals
+ import os
+ import re
+ import six
+-from collections import Iterable
++from collections.abc import Iterable
+ class Makefile(object):
+     '''Provides an interface for writing simple makefiles
+     Instances of this class are created, populated with rules, then
+     written.
+     '''
+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
+@@ -804,17 +805,17 @@ class HierarchicalStringList(object):
+     __slots__ = ('_strings', '_children')
+     def __init__(self):
+         # Please change ContextDerivedTypedHierarchicalStringList in context.py
+         # if you make changes here.
+         self._strings = StrictOrderingOnAppendList()
+         self._children = {}
+-    class StringListAdaptor(collections.Sequence):
++    class StringListAdaptor(collections.abc.Sequence):
+         def __init__(self, hsl):
+             self._hsl = hsl
+         def __getitem__(self, index):
+             return self._hsl._strings[index]
+         def __len__(self):
+             return len(self._hsl._strings)
+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
+@@ -7,17 +7,18 @@ A filter is a callable that accepts an i
+ dictionary of values, and returns a new iterable of test objects. It is
+ possible to define custom filters if the built-in ones are not enough.
+ """
+ from __future__ import absolute_import
+ 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
+ from .expression import (
+     parse,
+     ParseError,
+ )
This page took 0.084591 seconds and 4 git commands to generate.