[pypy-dev] Circular reference when importing struct from a pypy sandbox.

Jonathan Slenders jonathan at slenders.be
Sat Jul 7 17:25:22 CEST 2012

Hi everyone,

Not sure whether this is sandbox related, but I get a circular reference
when I want to import struct.py
The problem seems to be in the MixedModule import which get to import
himself somehow...
Anyone here who likes to take a look at the trackback below?

Actually, I'm not entirely sure whether I have the correct sys.path inside
the sandbox.
But anyway, I already had a great experience with the sandboxing mode.
(Right now, I'm rewriting sandlib to something usable in Twisted Matrix,
amazing technologies they are.)


Traceback (most recent call last):

  File "app_main.py", line 51, in run_toplevel

  File "/application/main.py", line 35, in <module>

    import struct

  File "/bin/pypy/module/struct/__init__.py", line 8, in <module>

    from pypy.interpreter.mixedmodule import MixedModule

  File "/bin/pypy/interpreter/mixedmodule.py", line 1, in <module>

    from pypy.interpreter.module import Module

  File "/bin/pypy/interpreter/module.py", line 5, in <module>

    from pypy.interpreter.baseobjspace import Wrappable

  File "/bin/pypy/interpreter/baseobjspace.py", line 2, in <module>

    from pypy.interpreter.executioncontext import ExecutionContext,
  File "/bin/pypy/interpreter/executioncontext.py", line 2, in <module>

    from pypy.interpreter.error import OperationError

  File "/bin/pypy/interpreter/error.py", line 2, in <module>

    from pypy.rlib import jit

  File "/bin/pypy/rlib/jit.py", line 3, in <module>

    import py

  File "/bin/pypy/bin/py.py", line 15, in <module>

    from pypy.tool import option

  File "/bin/pypy/tool/option.py", line 4, in <module>

    from pypy.config.pypyoption import get_pypy_config

  File "/bin/pypy/config/pypyoption.py", line 7, in <module>

    from pypy.config.translationoption import IS_64_BITS

  File "/bin/pypy/config/translationoption.py", line 6, in <module>

    from pypy.config.support import detect_number_of_processors

  File "/bin/pypy/config/support.py", line 5, in <module>

    import re, sys, os, subprocess

  File "/bin/lib-python/2.7/subprocess.py", line 398, in <module>

    import signal

  File "/bin/pypy/module/signal/__init__.py", line 2, in <module>

    from pypy.interpreter.mixedmodule import MixedModule

ImportError: cannot import name 'MixedModule'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120707/db9befff/attachment.html>

More information about the pypy-dev mailing list