Jean-Paul Calderone <exar...@divmod.com> added the comment:

This is causing problems for me as well.  The attached patch no longer
applies cleanly to trunk.  I've attached an updated version which
addresses the conflicts.  The new behavior fixes the issues I have with
the current behavior.  It'd be great to have it applied.

> If code objects grew a __module__ attribute (which functions already
> have), wouldn't it be just a matter of falling back on 
> sys.modules[my_code_object.__module__].__file__ when
> my_code_object.co_filename points to a non-existent file?

It'd be nice if it wasn't necessary to check to see if co_filename
referred to an existing file.  Can we have a solution which creates one
definitive, correct way to determine the source file?

----------
keywords: +patch
nosy: +exarkun
Added file: http://bugs.python.org/file12598/update_co_filename.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1180193>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to