From: SourceForge.net <no...@so...> - 2007-09-22 01:01:13
|
Patches item #1783692, was opened at 2007-08-29 00:37 Message generated for change (Comment added) made by pjenvey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1783692&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Philip Jenvey (pjenvey) Assigned to: Nobody/Anonymous (nobody) Summary: Implementation of tempfile with secure files Initial Comment: Here is the tempfile module, actually from Python 2.5.1 (which doesn't offer that many changes over 2.3) It's been updated to: o make mkdtemp work (this supercedes ticket #1755344) o make mkstemp work as much as it can. A secure file is created via java's File.createTempFile method (this essentially uses O_EXCL | O_CREAT under the covers, to ensure the file didn't already exist) The problem with mkstemp is it returns a tuple (fd, filename). We obviously can't support returning a file descriptor, so we return None instead o make [Named]TemporaryFile work with mkstemp without file descriptors test_tempfile.py from 2.5.1 is also included. It required a couple changes to fix Jythonisms -- in particular the mkstemp test was disabled because it operates on a file descriptor. All tests pass ---------------------------------------------------------------------- >Comment By: Philip Jenvey (pjenvey) Date: 2007-09-22 02:01 Message: Logged In: YES user_id=145787 Originator: YES I'm holding off on this for a bit for an attempt to make file descriptors work (by faking them) ---------------------------------------------------------------------- Comment By: Philip Jenvey (pjenvey) Date: 2007-08-29 00:48 Message: Logged In: YES user_id=145787 Originator: YES The addition of mkdtemp also fixes test_shutil as pointed out in #1755344 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1783692&group_id=12867 |