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.
Created on 2015年03月21日 18:59 by gregory.p.smith, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 10327 | Elvis.Pranskevichus, 2018年11月05日 14:00 | ||
| Messages (4) | |||
|---|---|---|---|
| msg238824 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2015年03月21日 18:59 | |
The zipimport module checks the timestamp of a pyc file loaded from the zip file against the timestamp of a corresponding py file in the zip if any. This seems pointless. By the time someone has created a zip file for zipimport they should have guaranteed that the pyc's are fresh or not have put them into the zip file at all (wasteful). https://hg.python.org/cpython/file/e8878579eb68/Modules/zipimport.c#l1187 There is a comment in the code alluding to this, but the mtime check is still done right above. |
|||
| msg325730 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2018年09月19日 07:54 | |
zipimport has been rewritten in pure Python (issue25711). |
|||
| msg329316 - (view) | Author: Elvis Pranskevichus (Elvis.Pranskevichus) * (Python triager) | Date: 2018年11月05日 19:56 | |
I don't think that breaking the .pyc contract by assumption is a good thing. The desired behavior of never checking the .pyc freshness can be achieved by using unchecked hash-based compilation, or using hash-based compilation and --check-hash-based-pycs=never. Perhaps we can go further and add a --check-timestamp-based-pycs=never, but IMO, this should be explicit in all cases, including zipimport. |
|||
| msg329877 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2018年11月14日 00:54 | |
Correct, this issue was filed before we had the new pyc options (which came out of our September core dev. sprint in 2016 iirc). I'll just close it, the way forward for people using zip files on modern CPython interpreters is to explicitly use the new unchecked feature. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:14 | admin | set | github: 67922 |
| 2018年11月14日 00:54:49 | gregory.p.smith | set | status: open -> closed versions: + Python 3.7, Python 3.8 messages: + msg329877 resolution: out of date stage: patch review -> resolved |
| 2018年11月05日 19:56:30 | Elvis.Pranskevichus | set | nosy:
+ Elvis.Pranskevichus messages: + msg329316 |
| 2018年11月05日 14:00:30 | Elvis.Pranskevichus | set | keywords:
+ patch stage: patch review pull_requests: + pull_request9638 |
| 2018年09月19日 07:54:42 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg325730 |
| 2015年08月05日 15:52:03 | eric.snow | set | nosy:
+ brett.cannon, ncoghlan, eric.snow, superluser versions: + Python 3.6, - Python 3.5 |
| 2015年03月21日 18:59:07 | gregory.p.smith | create | |