This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Missing "fixup" for "exceptions" module
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, gvanrossum, jhermann
Priority: normal Keywords:

Created on 2001-05-07 12:52 by jhermann, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fixup.patch jhermann, 2001-05-07 12:56 Patch for pythonrun.c (Python 2.1)
Messages (3)
msg4661 - (view) Author: Jürgen Hermann (jhermann) Date: 2001-05-07 12:52
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.
msg4662 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-08-10 19:17
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?
msg4663 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2001-08-13 23:00
Logged In: YES 
user_id=12800

I think this is a good patch to install, since it makes
reload(exceptions) act just like reload(sys).  To me, both
are fundamental modules.  So I'm accepting this one and
adding a test case.

But I don't think/know whether this is related to 449151
because I haven't actually been able to reproduce the
problem described in that bug report yet.
History
Date User Action Args
2022-04-10 16:04:02adminsetgithub: 34467
2001-05-07 12:52:50jhermanncreate