[neon/qt/qtwebengine/Neon/release_jammy] debian: Update bundled six module for Python 3.12 compatibility.
Soren Stoutner
null at kde.org
Wed Aug 21 09:44:47 BST 2024
Git commit aafdf037941f344080456a7281747c046c14ac18 by Soren Stoutner, on behalf of Dmitry Shachnev.
Committed on 08/05/2024 at 00:20.
Pushed by jriddell into branch 'Neon/release_jammy'.
Update bundled six module for Python 3.12 compatibility.
M +1 -0 debian/changelog
A +56 -0 debian/patches/python3.12-six.patch
M +1 -0 debian/patches/series
https://invent.kde.org/neon/qt/qtwebengine/-/commit/aafdf037941f344080456a7281747c046c14ac18
diff --git a/debian/changelog b/debian/changelog
index 7f62e7f..08fc89b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ qtwebengine-opensource-src (5.15.15+dfsg-4) UNRELEASED; urgency=medium
* Replace pkg-config build-dependency with pkgconf.
* Add upstream patches to stop using imp Python module (LP: #2058066).
Thanks Zixing Liu!
+ * Update bundled six module for Python 3.12 compatibility (LP: #2058117).
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Tue, 07 May 2024 16:40:19 -0700
diff --git a/debian/patches/python3.12-six.patch b/debian/patches/python3.12-six.patch
new file mode 100644
index 0000000..f1f5ae1
--- /dev/null
+++ b/debian/patches/python3.12-six.patch
@@ -0,0 +1,56 @@
+Description: implement find_spec() for _SixMetaPathImporter
+Origin: upstream, https://github.com/benjaminp/six/commit/25916292d96f5f09
+Last-Update: 2024-03-17
+
+--- a/src/3rdparty/chromium/third_party/protobuf/third_party/six/six.py
++++ b/src/3rdparty/chromium/third_party/protobuf/third_party/six/six.py
+@@ -71,6 +71,11 @@ else:
+ MAXSIZE = int((1 << 63) - 1)
+ del X
+
++if PY34:
++ from importlib.util import spec_from_loader
++else:
++ spec_from_loader = None
++
+
+ def _add_doc(func, doc):
+ """Add documentation to a function."""
+@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
+ return self
+ return None
+
++ def find_spec(self, fullname, path, target=None):
++ if fullname in self.known_modules:
++ return spec_from_loader(fullname, self)
++ return None
++
+ def __get_module(self, fullname):
+ try:
+ return self.known_modules[fullname]
+--- a/src/3rdparty/chromium/tools/grit/third_party/six/__init__.py
++++ b/src/3rdparty/chromium/tools/grit/third_party/six/__init__.py
+@@ -71,6 +71,11 @@ else:
+ MAXSIZE = int((1 << 63) - 1)
+ del X
+
++if PY34:
++ from importlib.util import spec_from_loader
++else:
++ spec_from_loader = None
++
+
+ def _add_doc(func, doc):
+ """Add documentation to a function."""
+@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
+ return self
+ return None
+
++ def find_spec(self, fullname, path, target=None):
++ if fullname in self.known_modules:
++ return spec_from_loader(fullname, self)
++ return None
++
+ def __get_module(self, fullname):
+ try:
+ return self.known_modules[fullname]
diff --git a/debian/patches/series b/debian/patches/series
index 2f1a2e4..b6fcdaf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,6 +9,7 @@ python3.patch
chromium-python3.patch
python3.11.patch
python3.12-imp.patch
+python3.12-six.patch
# General patches.
verbose-gn-bootstrap.patch
More information about the Neon-commits
mailing list