Title: logging module / wrong bytecode?
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: annacoder, doko, jimjjewett, vinay.sajip
Priority: normal Keywords:

Created on 2007-01-11 23:06 by doko, last changed 2009-06-05 22:22 by annacoder. This issue is now closed.

Messages (3)
msg30971 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2007-01-11 23:06
[forwarded from]

seen with python2.4 and python2.5 on debian unstable

import logging

The output when the logging/__init__.pyc file exists is:

and when the __init__.pyc is deleted the output becomes:
msg30972 - (view) Author: Jim Jewett (jimjjewett) Date: 2007-01-12 21:22
Does debian by any chance (try to?) store the .py and .pyc files in different directories?

The second result is correct; the second suggests that it somehow got confused about which frames to ignore.
msg30973 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2007-01-15 12:48
It's also possible that symlinks mean that the value stored in a .pyc file are different to the expected values. See bug #1616422 - this appears to be the same issue.

It's not about the frames - it's about the paths stored in the .pyc files. If at any time the path (the module's __file__ attribute) in the .pyc file is different to the actual path to the .py file, you would get this issue. It's not a logging problem per se - it's that the .py path and the path in the .pyc files don't match when they should. Logging just happens to be one of the packages which tries to use the information.
Date User Action Args
2009-06-05 22:22:43annacodersetnosy: + annacoder
2007-01-11 23:06:53dokocreate