[Python-checkins] python/dist/src/Python errors.c,2.75,2.76 pythonrun.c,2.177,2.178

Guido van Rossum guido@python.org
Tue, 18 Feb 2003 19:46:17 -0500


> Log Message:
> Fix bug 683658 - PyErr_Warn may cause import deadlock.
> 
> 
> Index: errors.c
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v
> retrieving revision 2.75
> retrieving revision 2.76
> diff -C2 -d -r2.75 -r2.76
> *** errors.c	11 Dec 2002 14:04:59 -0000	2.75
> --- errors.c	19 Feb 2003 00:33:32 -0000	2.76
> ***************
> *** 601,604 ****
> --- 601,605 ----
>   }
>   
> + extern PyObject *PyModule_WarningsModule;
[...]

I'll let this go for now, but this should *not* be fixed this way: it
breaks when multiple interpreters are used.  This must be fixed before
2.3b1 is released.  (And you never explained why you couldn't
restructure your main program to avoid doing actions as a side effect
of import, as I suggested.)

--Guido van Rossum (home page: http://www.python.org/~guido/)