Skip to content
Myr

Import tempfile late

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 502c86b · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:click/_compat.py+1 added-1 removed
1 unmodified line
2import io3import os4import sys5import codecs6import tempfile6from weakref import WeakKeyDictionary789PY2 = sys.version_info[0] == 2
388 unmodified lines
398 # Atomic writes are more complicated. They work by opening a file399 # as a proxy in the same folder and then using the fdopen400 # functionality to wrap it in a python file. Then we wrap it in an401 # atomic file that moves the file over on close.402 import tempfile403 fd, tmp_filename = tempfile.mkstemp(dir=os.path.dirname(filename),404 prefix='.__atomic-write')405406 if encoding is not None:
119 unmodified lines