Confirmed. Patch seems to work.

On 7/4/23 13:10, Andreas Metzler wrote:
On 2023-07-04 Blair Noctis <n...@sail.ng> wrote:
On Tue, 04 Jul 2023 14:37:49 +0300 Adrian Bunk <b...@debian.org> wrote:
[...]
     result = self._execute('import importlib; 
print(importlib.util.MAGIC_NUMBER)', version)
              
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/share/python3/debpython/interpreter.py", line 359, in _execute
     raise Exception('{} failed with status code {}'.format(command, 
output['returncode']))
Exception: ('python3.11', '-c', 'import importlib; 
print(importlib.util.MAGIC_NUMBER)') failed with status code 1
[...]
`import importlib` doesn't bring in `importlib.util`, need `import 
importlib.util`.
IDK if that's the cause though.
Hello,

patching as suggested ...

--- /tmp/interpreter.py 2023-07-04 19:06:11.131647132 +0200
+++ /chroots/sid/usr/share/python3/debpython/interpreter.py     2023-07-04 
19:06:48.915235377 +0200
@@ -230,7 +230,7 @@ class Interpreter:
          version = Version(version or self.version)
          if self.impl == 'cpython' and version << Version('3'):
              return ''
-        result = self._execute('import importlib; 
print(importlib.util.MAGIC_NUMBER)', version)
+        result = self._execute('import importlib.util; 
print(importlib.util.MAGIC_NUMBER)', version)
          return eval(result)

      def magic_tag(self, version=None):

... seems to work.

cu Andreas



--
Keep well,
Chris
<><

Reply via email to