[issue13645] test_import fails after test_coding

2011-12-21 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: test_import fails when run directly after test_coding: $ ./python -m test test_coding test_import [1/2] test_coding [2/2] test_import test test_import failed -- Traceback (most recent call last): File

[issue13645] test_import fails after test_coding

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The cause is that the import machinery checks the timestamp stored in the pyc file to decide whether it must be refreshed. Depending on the system's timestamp granularity, there can be false negatives: the py file was modified twice with the

[issue13645] test_import fails after test_coding

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The pyc format currently stores the modification time cast to a 32-bit int. A 3.3 iteration of the pyc format could instead store two 32-bit ints, one for the integral part and one for the fractional part (e.g. in nanoseconds). When

[issue13645] test_import fails after test_coding

2011-12-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: a struct timespec providing theoretical nanosecond precision. Indeed. EXT3's timestamps have a 1s granularity, for example. Another possibility would be to store both mtime and st_size (it's the default heuristic used by rsync does

[issue13645] test_import fails after test_coding

2011-12-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f4afc6858ed2 by Antoine Pitrou in branch '3.2': Issue #13645: fix test_import failure when run immediately after test_coding. http://hg.python.org/cpython/rev/f4afc6858ed2 New changeset a6bd166abde5 by Antoine

[issue13645] test_import fails after test_coding

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: In the meantime, I've committed the test patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13645 ___

[issue13645] test_import fails after test_coding

2011-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Indeed. EXT3's timestamps have a 1s granularity, for example. Another possibility would be to store both mtime and st_size (it's the default heuristic used by rsync does to decide whether to skip a file). Good idea. It would also avoid too

[issue13645] test_import fails after test_coding

2011-12-21 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13645 ___ ___ Python-bugs-list