Message178819
| 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 |
<1357142805.9.0.59504210268.issue16047@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
After applying the fix for issue11824 to tip there ended up being three more
issues:
1. makeconfig.py 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/site.py", line 578, in main
setcopyright()
File "/Users/meadori/Code/src/cpython/Lib/site.py", 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
makeconfig.py, (2) by making sure '_frozen_importlib' is in the frozen
module table created by freeze.py, 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? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年01月02日 16:06:45 | meador.inge | set | recipients:
+ meador.inge, lemburg, loewis, barry, brett.cannon, jcea, eric.smith, jkloth, Arfrever, Trundle, eric.snow |
| 2013年01月02日 16:06:45 | meador.inge | set | messageid: <1357142805.9.0.59504210268.issue16047@psf.upfronthosting.co.za> |
| 2013年01月02日 16:06:45 | meador.inge | link | issue16047 messages |
| 2013年01月02日 16:06:45 | meador.inge | create |
|