Charles-François Natali <neolo...@free.fr> added the comment: Here's a patch using the '.tmp' suffix. I also updated test_import. Note that the current test_import.test_execute_bit_not_copied is a no-op: """ fname = TESTFN + os.extsep + "py" create_empty_file(fname) os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) __import__(TESTFN) fn = imp.cache_from_source(fname) if not os.path.exists(fn): self.fail("__import__ did not result in creation of " "either a .pyc or .pyo file") s = os.stat(fn) self.assertEqual( stat.S_IMODE(s.st_mode), stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)
""" The indentation is wrong: the stat() is never performed... I'll fix that in 3.2 and 2.7. ---------- Added file: http://bugs.python.org/file23606/import_perm.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13303> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com