Re: Error with co_filename when loading modules from zip file

2012-03-06 Thread Peter Otten
Bob Rossi wrote: > On Tue, Mar 06, 2012 at 02:38:50AM -0800, Vinay Sajip wrote: >> On Mar 6, 2:40 am, Bob Rossi wrote: >> >> > Darn it, this was reported in 2007 >> > http://bugs.python.org/issue1180193 >> > and it was mentioned the logging package was effected. >> > >> > Yikes. >> > >> >> I wi

Re: Error with co_filename when loading modules from zip file

2012-03-06 Thread Bob Rossi
On Tue, Mar 06, 2012 at 02:38:50AM -0800, Vinay Sajip wrote: > On Mar 6, 2:40 am, Bob Rossi wrote: > > > Darn it, this was reported in 2007 > >  http://bugs.python.org/issue1180193 > > and it was mentioned the logging package was effected. > > > > Yikes. > > > > I will think about this, but don'

Re: Error with co_filename when loading modules from zip file

2012-03-06 Thread Vinay Sajip
On Mar 6, 2:40 am, Bob Rossi wrote: > Darn it, this was reported in 2007 >  http://bugs.python.org/issue1180193 > and it was mentioned the logging package was effected. > > Yikes. > I will think about this, but don't expect any quick resolution :-( I think the right fix would be not in the loggi

Re: Error with co_filename when loading modules from zip file

2012-03-05 Thread Bob Rossi
On Mon, Mar 05, 2012 at 02:22:55PM -0800, Vinay Sajip wrote: > On Mar 5, 8:36 pm, Bob wrote: > > > The logging package gets the filename and line number > > of the calling function by looking at two variables, the filename > > of the frame in the stack trace and the variable logging._srcfile. > >

Re: Error with co_filename when loading modules from zip file

2012-03-05 Thread Bob Rossi
On Mon, Mar 05, 2012 at 02:22:55PM -0800, Vinay Sajip wrote: > On Mar 5, 8:36 pm, Bob wrote: > > > The logging package gets the filename and line number > > of the calling function by looking at two variables, the filename > > of the frame in the stack trace and the variable logging._srcfile. > >

Re: Error with co_filename when loading modules from zip file

2012-03-05 Thread Vinay Sajip
On Mar 5, 8:36 pm, Bob wrote: > The logging package gets the filename and line number > of the calling function by looking at two variables, the filename > of the frame in the stack trace and the variable logging._srcfile. > The comparison is done in logging/__init__.py:findCaller. > The _srcfil

Error with co_filename when loading modules from zip file

2012-03-05 Thread Bob
Hi, I'm using a program that distributes python in a zip file and ran into an issue with the logging package. It seems to return the wrong filename/line number when loading python from a zip file. Please help! I'm using python31, and have copied the lib directory to /home/user/python3.1 and hav