diff --git a/gnu/local.mk b/gnu/local.mk index 007c743fe49..a3f7a14a62d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2138,6 +2138,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \ %D%/packages/patches/python-sshtunnel-pep518.patch \ %D%/packages/patches/python-zeroc-ice-3.6.5-python-3.11-support.patch \ + %D%/packages/patches/python-zeroc-ice-3.6.5-python-3.12-support.patch \ %D%/packages/patches/python-zipfile2-python-3.12-support.patch \ %D%/packages/patches/qcodeeditor-qt6.patch \ %D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch \ diff --git a/gnu/packages/patches/python-zeroc-ice-3.6.5-python-3.12-support.patch b/gnu/packages/patches/python-zeroc-ice-3.6.5-python-3.12-support.patch new file mode 100644 index 00000000000..95d1d19c2d2 --- /dev/null +++ b/gnu/packages/patches/python-zeroc-ice-3.6.5-python-3.12-support.patch @@ -0,0 +1,24 @@ +diff --git a/lib/Ice.py b/lib/Ice.py +--- a/lib/Ice.py ++++ b/lib/Ice.py +@@ -11,7 +11,7 @@ + Ice module + """ + +-import sys, string, imp, os, threading, warnings, datetime ++import sys, string, importlib, os, threading, warnings, datetime + + # + # RTTI problems can occur in C++ code unless we modify Python's dlopen flags. +@@ -373,7 +373,8 @@ def createModule(name): + elif curr in _pendingModules: + mod = _pendingModules[curr] + else: +- nmod = imp.new_module(curr) ++ spec = importlib.util.spec_from_loader(curr, loader=None) ++ nmod = importlib.util.module_from_spec(spec) + _pendingModules[curr] = nmod + mod = nmod + +-- + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ae0e22216c7..0732d56856b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -41675,7 +41675,8 @@ interfaces.") "0mikjfvq26kh8asnn9v55z41pap4c5ypymqnwwi4xkavc3mzyda2")) (patches (search-patches - "python-zeroc-ice-3.6.5-python-3.11-support.patch")))) + "python-zeroc-ice-3.6.5-python-3.11-support.patch" + "python-zeroc-ice-3.6.5-python-3.12-support.patch")))) (arguments (substitute-keyword-arguments arguments ((#:phases phases #~%standard-phases)