Skip to content

Commit

Permalink
Merge pull request #403 from rolando-contribute/py3-stdin-encoding
Browse files Browse the repository at this point in the history
Added mode='wt' to tempfile creation.
  • Loading branch information
nvie committed Oct 20, 2016
2 parents 1db806f + f3dfae0 commit dc49d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piptools/scripts/compile.py
Expand Up @@ -148,7 +148,7 @@ def cli(verbose, dry_run, pre, rebuild, find_links, index_url, extra_index_url,
# pip requires filenames and not files. Since we want to support
# piping from stdin, we need to briefly save the input from stdin
# to a temporary file and have pip read that.
with tempfile.NamedTemporaryFile() as tmpfile:
with tempfile.NamedTemporaryFile(mode='wt') as tmpfile:
tmpfile.write(sys.stdin.read())
tmpfile.flush()
constraints.extend(parse_requirements(
Expand Down

0 comments on commit dc49d01

Please sign in to comment.