Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(77)

Issue 1543: Use tempfile instead of ad-hoc temporary file

Can't Edit
Can't Publish+Mail
Start Review
Created:
18 years ago by Robert Kern
Modified:
11 years, 10 months ago
Reviewers:
ondrej.certik, pgmdevlist
Base URL:
http://svn.scipy.org/svn/numpy/trunk/
Visibility:
Public.

Description

Instead of make a timestamp-based filename using strftime, just use tempfile.mkstemp(). It's safer, since the current working directory may not be writable. Also, we just got a bug report from someone using VS 2008 to build numpy; with that C runtime's implementation of strftime, the %s format code does not appear to be valid.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
numpy/ma/tests/test_mrecords.py View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 2
Robert Kern
18 years ago (2008-06-03 19:17:46 UTC) #1
ondrej.certik
18 years ago (2008-06-03 20:33:25 UTC) #2
Excellent, now it is much simpler and more robust. +1

Ondrej
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b