[issue13645] import machinery vulnerable to timestamp collisions
Brett Cannon
report at bugs.python.org
Tue Jan 10 22:40:23 CET 2012
Brett Cannon <brett at python.org> added the comment:
On Mon, Jan 9, 2012 at 18:05, Antoine Pitrou <report at bugs.python.org> wrote:
>
> Antoine Pitrou <pitrou at free.fr> added the comment:
>
> > I'm not suggesting two stat calls (in the general case); you would
> > call one or the other depending on the magic number of the pyc file.
>
> The proposal is to store both mtime and size, actually, to make false
> positives less likely.
Then a method that returns some object representing all of the needed info
on the source file is needed, but that does NOT blindly return the stat
info (eg. modification date, "file" size, and even source as bytes can be
in this object). It could even have methods to generate the bytecode, etc.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13645>
_______________________________________
More information about the Python-bugs-list
mailing list