Hi,
Made a patch to fix the autopkgtest issue with Py 3.12. Attaching the
debdiff file.
Cheers!
diff -Nru circuits-3.2.2/debian/changelog circuits-3.2.2/debian/changelog
--- circuits-3.2.2/debian/changelog     2022-12-14 16:15:09.000000000 +0000
+++ circuits-3.2.2/debian/changelog     2024-01-06 01:27:18.000000000 +0000
@@ -1,3 +1,11 @@
+circuits (3.2.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer/Team upload. (Closes: #1059657)
+  * Included a patch for /circuits/core/utils.py to replace
+    deprecated imp with importlib to fix autopkgtest in Py3.12.
+
+ -- Yogeswaran Umasankar <kd8...@gmail.com>  Sat, 06 Jan 2024 01:27:18 +0000
+
 circuits (3.2.2-1) unstable; urgency=medium
 
   * New upstream version 3.2.2 (Closes: #1024860)
diff -Nru circuits-3.2.2/debian/patches/06_replace-imp-with-importlib.patch 
circuits-3.2.2/debian/patches/06_replace-imp-with-importlib.patch
--- circuits-3.2.2/debian/patches/06_replace-imp-with-importlib.patch   
1970-01-01 00:00:00.000000000 +0000
+++ circuits-3.2.2/debian/patches/06_replace-imp-with-importlib.patch   
2024-01-06 01:21:32.000000000 +0000
@@ -0,0 +1,27 @@
+Description: Implemented importlib to fix autopkgtest failure with Python 3.12.
+Author: Yogeswaran Umasankar <kd8...@gmail.com>
+Last-Update: 2024-01-06
+
+--- a/circuits/core/utils.py
++++ b/circuits/core/utils.py
+@@ -3,7 +3,7 @@
+ This module defines utilities used by circuits.
+ """
+ import sys
+-from imp import reload
++import importlib
+ 
+ 
+ def flatten(root, visited=None):
+@@ -53,9 +53,9 @@ def safeimport(name):
+     modules = sys.modules.copy()
+     try:
+         if name in sys.modules:
+-            return reload(sys.modules[name])
++            return importlib.reload(sys.modules[name])
+         else:
+-            return __import__(name, globals(), locals(), [""])
++            return importlib.import_module(name)
+     except Exception:
+         for name in sys.modules.copy():
+             if name not in modules:
diff -Nru circuits-3.2.2/debian/patches/series 
circuits-3.2.2/debian/patches/series
--- circuits-3.2.2/debian/patches/series        2022-12-14 16:15:09.000000000 
+0000
+++ circuits-3.2.2/debian/patches/series        2024-01-06 01:15:42.000000000 
+0000
@@ -2,3 +2,4 @@
 03_disable-address-check.patch
 04_remove-google-adsense.patch
 05_remove-privacy-breach-badges.patch
+06_replace-imp-with-importlib.patch

Attachment: signature.asc
Description: PGP signature



Reply via email to