This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients barry, lemburg
Date 2014-06-12.16:41:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 12.06.2014 18:35, Barry A. Warsaw wrote:
> I'm -0 on this patch.  I can understand that in some sense, frozen modules do semantically have an associated file, but OTOH, once they're frozen the connection to their file is broken.  Also, I think anything that assumes __file__ exists is simply broken and should be fixed.  There are other cases than frozen modules where a module would have no reasonable value for __file__ and thus shouldn't have one.

This one falls into the practicality beats purity category. Of
course, the __file__ attribute doesn't always makes sense as
file path, but it does serve an information purpose.

We're doing this in eGenix PyRun to get 3rd party code working
(including parts of the Python stdlib :-)). Not doing so
would simply lead to the whole freezing approach pretty much
useless, since so much code uses the attribute without checking
or providing a fallback solution.
Date User Action Args
2014-06-12 16:41:28lemburgsetrecipients: + lemburg, barry
2014-06-12 16:41:28lemburglinkissue21736 messages
2014-06-12 16:41:27lemburgcreate