homepage

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 pdsimanyi
Recipients markon, pdsimanyi
Date 2009年05月26日.19:47:01
SpamBayes Score 3.0940917e-06
Marked as misclassified No
Message-id <1243367226.93.0.0932337161956.issue6074@psf.upfronthosting.co.za>
In-reply-to
Content
Oops, I was not accurate in reporting behavior: I now believe that this fails on Windows XP, but may work 
fine on Linux. Below are my results, showing reproducible failure on XP. The most important thing about 
this is: on XP, once the .pyc file is "broken", Python will not overwrite it, and it must be *manually* 
removed. This is bad!
I will append Ubuntu results in a few minutes.
To reproduce the problem, I had to modify the script to include a "sleep", see attached 
showpyreadonlysleep.sh (cygwin bash script).
Here's the results of running showpyreadonlysleep.sh, then manually reproducing the problem with 
"touch/python":
$ ./showpycreadonlysleep.sh
umask = 0022
CYGWIN_NT-5.1 psimanyi_xp 1.5.25(0.156/4/2) 2008年06月12日 19:34 i686 Cygwin
Python 2.6.2
Running python.exe from: /cygdrive/c/Python26/python
-rw-r--r-- 1 psimanyi mkgroup-l-d 10 May 26 12:43 b.py
b
-rwx------+ 1 psimanyi mkgroup-l-d 137 May 26 12:43 b.pyc
b
-r-x------+ 1 psimanyi mkgroup-l-d 137 May 26 12:43 b.pyc
# c:\Documents and Settings\psimanyi\b.pyc has bad mtime
import b # from c:\Documents and Settings\psimanyi\b.py
# can't create c:\Documents and Settings\psimanyi\b.pyc
And now, running manually:
$ touch b.py
psimanyi@psimanyi_xp ~
$ python -v a.py 2>&1 | grep 'b\.py'
# c:\Documents and Settings\psimanyi\b.pyc has bad mtime
import b # from c:\Documents and Settings\psimanyi\b.py
# can't create c:\Documents and Settings\psimanyi\b.pyc
psimanyi@psimanyi_xp ~
$ touch b.py
psimanyi@psimanyi_xp ~
$ python -v a.py 2>&1 | grep 'b\.py'
# c:\Documents and Settings\psimanyi\b.pyc has bad mtime
import b # from c:\Documents and Settings\psimanyi\b.py
# can't create c:\Documents and Settings\psimanyi\b.pyc
Again, this shows that without removing the .pyc manually, the pyc will not be overwritten, and therefore 
program startup will be slow!
History
Date User Action Args
2009年05月26日 19:47:07pdsimanyisetrecipients: + pdsimanyi, markon
2009年05月26日 19:47:06pdsimanyisetmessageid: <1243367226.93.0.0932337161956.issue6074@psf.upfronthosting.co.za>
2009年05月26日 19:47:04pdsimanyilinkissue6074 messages
2009年05月26日 19:47:02pdsimanyicreate

AltStyle によって変換されたページ (->オリジナル) /