New submission from Mark Tolonen: I built a C extension using SWIG for both Python 3.2 and Python 3.3. The Python file supplying class proxies uses imp.load_module and fails with the following traceback on 3.3.0rc1, but works on 3.2.3:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File ".\Widget.py", line 26, in <module> _Widget = swig_import_helper() File ".\Widget.py", line 22, in swig_import_helper _mod = imp.load_module('_Widget', fp, pathname, description) File "D:\dev\python33\lib\imp.py", line 171, in load_module raise ImportError(msg, name=name) ImportError: Don't know how to import _Widget (type code 3 It looks like imp.py is new in Python 3.3, and imp.load_module no longer supports the C_EXTENSION type. It looks like a regression. To reproduce, I was able to run the following lines with the .pyd file in the current directory: import imp fp, pathname, description = imp.find_module('_Widget') imp.load_module('_Widget', fp, pathname, description) Nit: Also note the missing final ')' in the ImportError message. ---------- components: Library (Lib) messages: 169506 nosy: metolone priority: normal severity: normal status: open title: imp.load_module doesn't support C_EXTENSION type type: behavior versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15828> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com