Issue1024
Created on 2008年04月17日.06:04:28 by pjenvey, last changed 2009年03月06日.04:16:19 by fwierzbicki.
| Messages | |||
|---|---|---|---|
| msg3157 (view) | Author: Philip Jenvey (pjenvey) | Date: 2008年04月17日.06:04:27 | |
CPython .pyc files include the modified time of the .py file it was created from. CPython then knows that the .pyc is up to date by comparing the .py's mtime against the .pyc's stored value Jython doesn't store this value in $py.class, all it does is compare the $py.class's mtime against .py on the filesystem This doesn't seem like a big deal but it makes us incompatible with CPython I ran into a situation where this caused a hard to diagnose problem: a test would generate a sample.py file and invoke a separate process to import it. Then it would copy a different version of the same sample.py file over, and invoke another process that imported it. The first $py.class generated actually ended up having the same mtime as the second .py that was copied over. Because we only compare the mtimes of the files themselves, Jython assumed the bytecode was up to date when it wasn't, the second .py wasn't compiled/used (causing a very weird bug) In this situation in CPython, the first .pyc might have the same mtime as the second .py, like our situation above in Jython, but CPython would actually be comparing the second .py's mtime against the mtime of the first .py, which in this situation were reliably different. We need to work this way too to avoid surprises like this with code written for CPython |
|||
| msg3158 (view) | Author: Charlie Groves (cgroves) | Date: 2008年04月17日.20:33:37 | |
Issue #1567212 reports the same underlying issue, though it could use a better title |
|||
| msg3159 (view) | Author: Philip Jenvey (pjenvey) | Date: 2008年04月17日.20:45:26 | |
dupe of #1567212 |
|||
| msg3549 (view) | Author: Jim Baker (zyasoft) | Date: 2008年09月13日.23:10:45 | |
Assigned to myself to fix in org.python.compiler.ClassFile#write and corresponding org.python.core.imp#readCode |
|||
| msg4177 (view) | Author: Frank Wierzbicki (fwierzbicki) | Date: 2009年03月06日.04:16:18 | |
fixed in r6071 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2009年03月06日 04:16:19 | fwierzbicki | set | status: open -> closed resolution: duplicate -> fixed messages: + msg4177 |
| 2009年03月03日 20:37:18 | fwierzbicki | set | assignee: zyasoft -> fwierzbicki nosy: + fwierzbicki |
| 2008年09月13日 23:10:45 | zyasoft | set | status: closed -> open assignee: zyasoft messages: + msg3549 nosy: + zyasoft |
| 2008年04月17日 20:45:27 | pjenvey | set | status: open -> closed resolution: duplicate messages: + msg3159 priority: normal |
| 2008年04月17日 20:33:37 | cgroves | set | nosy:
+ cgroves messages: + msg3158 |
| 2008年04月17日 06:04:28 | pjenvey | create | |
Supported by Python Software Foundation,
Powered by Roundup