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

noreply@sourceforge.net noreply@sourceforge.net
Fri, 10 Aug 2001 12:17:00 -0700


Bugs item #422004, was opened at 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: Barry Warsaw (bwarsaw)
>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.

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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-10 12:17

Message:
Logged In: YES 
user_id=6380

Assigning this to Barry. I suspect this is related to SF bug
#449151.

I wonder if this would be sufficient to fix that bug?


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

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