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

SourceForge.net noreply at sourceforge.net
Mon Jun 19 04:08:19 CEST 2006


Bugs item #1508369, was opened at 2006-06-18 21:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: None
Priority: 5
Submitted By: David Hess (david_k_hess)
Assigned to: Jack Jansen (jackjansen)
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.



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

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