[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

Charles-François Natali report at bugs.python.org
Mon Oct 31 18:05:50 CET 2011


Charles-François Natali <neologix at free.fr> added the comment:

> (it does sound a bit overkill to me :-))

Well, it depends on what we want:
- if having a stale bytecode file indefinitely is acceptable, then the '.tmp' suffix approach is OK
- if not, then we should use pseudo-random files

> If you go that way, you should also modify Python/import.c to use a
> similar logic.

I think I would use mkstemp(), but yes, that's the idea.

So, what do you think?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13303>
_______________________________________


More information about the Python-bugs-list mailing list