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 meador.inge
Recipients Arfrever, Trundle, barry, brett.cannon, eric.smith, eric.snow, jcea, jkloth, lemburg, loewis, meador.inge
Date 2013-01-02.16:06:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
After applying the fix for issue11824 to tip there ended up being three more

   1. should have been updated in d777f854a66e when changing
      imp to _imp.  Without this change a reference to 'PyInit__imp'
      was being generated, but that function does not actually exist.

   2. After fixing (1) I hit an issue where '_frozen_importlib' can
      not be found while bringing up the interpreter.

   3. After fixing (2) I hit the following error when running the
      simple frozen hello app:

         $ ./hello 
         Traceback (most recent call last):

           File "/Users/meadori/Code/src/cpython/Lib/", line 578, in main
           File "/Users/meadori/Code/src/cpython/Lib/", line 438, in setcopyright
             here = os.path.dirname(os.__file__)
         AttributeError: 'module' object has no attribute '__file__'

      This happens during 'initsite' and is because of a change made
      to remove the __file__ attribute from frozen modules in 702009f3c0b1.

The attached patch fixes (1) by filtering '_imp' instead of 'imp' in, (2) by making sure '_frozen_importlib' is in the frozen
module table created by, and (3) by removing the code to delete
__file__ from frozen modules.

I am a little unsure about (3) since I am not sure why the __file__ attribute
is being removed to begin with.  eric.smith?
Date User Action Args
2013-01-02 16:06:45meador.ingesetrecipients: + meador.inge, lemburg, loewis, barry, brett.cannon, jcea, eric.smith, jkloth, Arfrever, Trundle, eric.snow
2013-01-02 16:06:45meador.ingesetmessageid: <>
2013-01-02 16:06:45meador.ingelinkissue16047 messages
2013-01-02 16:06:45meador.ingecreate