[issue21709] logging.__init__ assumes that __file__ is always set

Vinay Sajip report at bugs.python.org
Wed Jun 11 11:25:20 CEST 2014


Vinay Sajip added the comment:

> Could you please use a fix that works for Python tools in general?

I suggested an alternative implementation altogether in Issue #16778, but it was suggested that we wait for frame annotations. I'm not sure what the schedule for that is.

> The sys.frozen flag is not an official Python API and it's unlikely to become one

Would using imp.is_frozen('logging') rather than hasattr(sys, 'frozen') meet your requirement here? I'm not saying it's the ideal solution, but perhaps it will do until frame annotations arrive and we can avoid using filenames altogether?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21709>
_______________________________________


More information about the Python-bugs-list mailing list