[ python-Bugs-1508369 ] logging module formatter problem with %(filename)s

SourceForge.net noreply at sourceforge.net
Tue Apr 3 09:46:20 CEST 2007


Bugs item #1508369, was opened at 2006-06-19 04:08
Message generated for change (Comment added) made by zseil
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1508369&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Macintosh
Group: Python 2.4
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: David Hess (david_k_hess)
Assigned to: Ronald Oussoren (ronaldoussoren)
Summary: logging module formatter problem with %(filename)s

Initial Comment:

With Python 2.4.3 installed via the .dmg on to MacOS, when the python 
modules are compiled, they are compiled by specifying the path in such a 
way that it contains a double slash. This causes the logging module to not 
be able to figure out which module is the correct one to replace for %
(filename)s.

The following is the crux of the issue:

>>> logging.debug.func_code.co_filename
'/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/
logging/__init__.py'
>>> logging.__file__
'/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
logging/__init__.pyc'
>>> 

These two strings need to match for %(filename)s to work.

I deleted /Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/logging/__init__.pyc and recompiled it by just importing 
logging. That fixed the problem.

I assume the fix will be in the installer somewhere.



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

>Comment By: Žiga Seilnacht (zseil)
Date: 2007-04-03 09:46

Message:
Logged In: YES 
user_id=1326842
Originator: NO

The 2.4 branch is not maintained anymore.  Can this
bug be closed?

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

Comment By: Ronald Oussoren (ronaldoussoren)
Date: 2006-06-25 23:16

Message:
Logged In: YES 
user_id=580910

Fixed in revision #47093 for python2.5. 

I'm not closing the bug yet because I haven't backported this to 2.4 yet.

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

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


More information about the Python-bugs-list mailing list