[Python-bugs-list] [ python-Bugs-422004 ] Missing "fixup" for "exceptions" module

noreply@sourceforge.net noreply@sourceforge.net
Wed, 09 May 2001 09:00:37 -0700


Bugs item #422004, was updated on 2001-05-07 05:52
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=422004&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jürgen Hermann (jhermann)
>Assigned to: Guido van Rossum (gvanrossum)
>Summary: Missing "fixup" for "exceptions" module

Initial Comment:
The following call is missing in Py_Initialize():

*** pythonrun.c,1       Mon May  7 14:41:29 2001
--- pythonrun.c Mon May  7 14:42:39 2001
***************
*** 147,152 ****
--- 147,153 ----
 
        /* phase 2 of builtins */
        _PyImport_FixupExtension
("__builtin__", "__builtin__");
+       _PyImport_FixupExtension
("exceptions", "exceptions");
 
        initsigs(); /* Signal handling stuff, 
including initintr() */           

Without this patch, you might get this exception:

Traceback (most recent call last):
  File "/export/home/jhe/ns/httpd-
8332.195.226.107.82/cgi-bin/extest.py", line 1, in ?
    import exceptions
ImportError: Cannot re-init internal module 
exceptions                          

This bug was probably introduced when exception.py 
became a built-in extension module. Applies to both 
2.0 and 2.1 code.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=422004&group_id=5470