[issue11933] newer() function in dep_util.py mixes up new vs. old files due stat.st_mtime vs stat[ST_MTIME]
Éric Araujo
report at bugs.python.org
Wed Apr 27 10:39:22 CEST 2011
Éric Araujo <merwok at netwok.org> added the comment:
Hi! Welcome to the joy of Python and thanks for the bug report and analysis.
> In researching a bug
Is it public? I’d be curious to look at it.
> I was surprised that a newly created file was being replaced when
> being processed a second time
What created the file? What king of “processing” happened after?
> I tracked the surprise to diff Lib/distutils/dep_util.py @ 57642:9211a5d7d0b4
> where a comparison with a resolution of 1 second was replaced by a
> floating point comparison
Indeed. The whole distutils codebase should use ST_MTIME or st_mtime consistently.
> Using all floating point doesn't resolve the issue as OS timestamped
> files can have more resolution than python floating point may hold,
If I understand this bug correctly, it’s a platform-specific limitation. We can try changing all distutils files to use st_mtime and see if tests break. Would you like to work on a additional test case to reproduce your bug?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11933>
_______________________________________
More information about the Python-bugs-list
mailing list