piptools._compat.tempfile_compat module¶
Compatibility helpers for tempfile usage across platforms
and python versions.
- piptools._compat.tempfile_compat.named_temp_file(mode: str = 'wt') Iterator[IO[str]]¶
A safe wrapper over NamedTemporaryFile for usage on Windows as well as POSIX systems.
The issue we have is that we cannot guarantee that
pipwill open temporary files on Windows withO_TEMPORARYwhen passed the path, resulting in surprising behavior.