Stefan Krah <stefan-use...@bytereef.org> added the comment: And indeed, with this patch ...
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -777,6 +777,8 @@ mtime = _os.stat(self.path).st_mtime except OSError: mtime = -1 + if fullname == 'pep3147': + print(mtime, self._path_mtime) if mtime != self._path_mtime or _cache_refresh != self._cache_refresh: self._fill_cache() self._path_mtime = mtime Good version: [stefan@fedora-16-amd64 cpython]$ ./python -m test test_dot [1/1] test_dot 1330188705.3170006 1330188705.3100004 Warning -- sys.path was modified by test_dot Bad version: $ ./python -m test test_dot [1/1] test_dot 1330188676.0 1330188676.0 Warning -- sys.path was modified by test_dot test test_dot crashed -- Traceback (most recent call last): File "/home/stefan/pydev/cpython-imp/Lib/test/regrtest.py", line 1214, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "/home/stefan/pydev/cpython-imp/Lib/test/test_dot.py", line 20, in <module> assert m.__file__ == expected___file__ AssertionError 1 test failed: test_dot It looks like os.stat.st_mtime returns full seconds here on Ubuntu: Python 3.3.0a0 (default:3f9b3b6f7ff0, Feb 25 2012, 17:42:23) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.stat("./python").st_mtime 1330189060.0 >>> Nanoseconds, anyone? :) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14080> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com