[Python-Dev] 2.3a2 problem: iconv module raising RuntimeError
Guido van Rossum
guido@python.org
Thu, 20 Feb 2003 20:58:21 -0500
> There are already 2 bug reports with the build failing because the
> iconv module raises a RuntimeError. A patch to setup.py is below.
> The patch corrects the problem, but should anything else be done?
>
> The problem is that iconv builds ok, but the iconv_open fails so
> the module initialization failed, IIRC.
I don't think this is quite the right fix. Either it should catch all
exceptions, not just RuntimeError; after all an extension that fails
in init<module> could raise any exception at all; or it should do this
business of declaring the module invalid only when ImportError is
raised, and ignore other errors (with a less severe warning).
I think the second options is better -- after all the shared library
built and loaded correctly. The failure may be fixed by other means.
--Guido van Rossum (home page: http://www.python.org/~guido/)
> Index: setup.py
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/setup.py,v
> retrieving revision 1.146
> diff -w -u -r1.146 setup.py
> --- setup.py 18 Feb 2003 10:24:34 -0000 1.146
> +++ setup.py 20 Feb 2003 23:09:35 -0000
> @@ -207,7 +207,7 @@
> self.get_ext_filename(self.get_ext_fullname(ext.name)))
> try:
> imp.load_dynamic(ext.name, ext_filename)
> - except ImportError, why:
> + except (ImportError, RuntimeError), why:
>
> if 1:
> self.announce('*** WARNING: renaming "%s" since importing it'