diff -Nru python-csb-1.2.5+dfsg/debian/changelog python-csb-1.2.5+dfsg/debian/changelog --- python-csb-1.2.5+dfsg/debian/changelog 2023-07-04 18:50:12.000000000 +0000 +++ python-csb-1.2.5+dfsg/debian/changelog 2023-12-09 15:49:02.000000000 +0000 @@ -1,3 +1,10 @@ +python-csb (1.2.5+dfsg-10) unstable; urgency=medium + + * Team Upload. + * Add patch to fix FTBFS with py3.12 (Closes: #1056464) + + -- Nilesh Patra Sat, 09 Dec 2023 21:19:02 +0530 + python-csb (1.2.5+dfsg-9) unstable; urgency=medium * Fix Python3 syntax diff -Nru python-csb-1.2.5+dfsg/debian/patches/python-3.12.patch python-csb-1.2.5+dfsg/debian/patches/python-3.12.patch --- python-csb-1.2.5+dfsg/debian/patches/python-3.12.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-csb-1.2.5+dfsg/debian/patches/python-3.12.patch 2023-12-09 15:48:04.000000000 +0000 @@ -0,0 +1,44 @@ +Description: Replace imp usage with importlib since the former is removed with py3.12 +Author: Nilesh Patra +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056464 +Last-Update: 2023-12-09 +--- a/csb/build.py ++++ b/csb/build.py +@@ -55,7 +55,7 @@ + """ + It is now safe to import any modules + """ +-import imp ++import importlib + import shutil + import tarfile + +@@ -333,7 +333,7 @@ + version = package = None + + try: +- setup = imp.load_source('setupcsb', 'setup.py') ++ setup = importlib.machinery.SourceFileLoader('setupcsb', 'setup.py').load_module() + d = setup.build() + version = setup.VERSION + package = d.dist_files[0][2] +--- a/csb/test/__init__.py ++++ b/csb/test/__init__.py +@@ -159,7 +159,7 @@ + """ + import os + import sys +-import imp ++import importlib + import types + import time + import tempfile +@@ -564,7 +564,7 @@ + name = os.path.splitext(os.path.abspath(path))[0] + name = name.replace('.', '-').rstrip('__init__').strip(os.path.sep) + +- return imp.load_source(name, path) ++ return importlib.machinery.SourceFileLoader(name, path).load_module() + + def _recurse(self, obj): + """ diff -Nru python-csb-1.2.5+dfsg/debian/patches/series python-csb-1.2.5+dfsg/debian/patches/series --- python-csb-1.2.5+dfsg/debian/patches/series 2023-07-04 18:50:12.000000000 +0000 +++ python-csb-1.2.5+dfsg/debian/patches/series 2023-12-09 15:44:45.000000000 +0000 @@ -3,3 +3,4 @@ fix_setup.patch avoid-multiple-namespace.patch python3-syntax.patch +python-3.12.patch