[issue20942] _frozen_importlib should not have a __file__ attribute

Nick Coghlan report at bugs.python.org
Sun Mar 16 06:42:27 CET 2014


New submission from Nick Coghlan:

As part of the PEP 451 changes, frozen imports were updated to avoid setting the __file__ attribute, as that attribute makes no sense for frozen modules.

However, _frozen_importlib isn't loaded through the normal mechanisms (they don't exist yet!), so it is still getting a __file__ attribute set. (This was discovered while investigating issue 20884)

This is a fairly harmless state of affairs, so I suggest we leave it alone in the 3.4 maintenance releases, and just tidy it up in 3.5. However, I'm also open to fixing it in 3.4.1.

----------
components: Interpreter Core
messages: 213719
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: _frozen_importlib should not have a __file__ attribute
type: behavior
versions: Python 3.5

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


More information about the Python-bugs-list mailing list