Commit Graph

46 Commits

Author SHA1 Message Date
Martin Panter
b6b1ab4fa8 Issue #26385: Cleanup NamedTemporaryFile if fdopen() fails, by SilentGhost 2016-02-29 00:31:38 +00:00
Serhiy Storchaka
9eb0c0e73e Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
when a directory with the chosen name already exists on Windows as well as
on Unix.  tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
2015-05-20 00:10:56 +03:00
Victor Stinner
367f5d379c Issue #21058: Fix a leak of file descriptor in tempfile.NamedTemporaryFile(),
close the file descriptor if os.fdopen() fails
2014-03-25 09:08:16 +01:00
Zachary Ware
1f70221b86 Issue #19572: More silently skipped tests explicitly skipped. 2013-12-10 14:09:20 -06:00
Eli Bendersky
e207e38c53 Close #18945: Add tests for tempfile name collision handling.
Patch by Vlad Shcherbina
2013-09-15 12:08:14 -07:00
Eli Bendersky
8c7e925f6e Close #18849: Fixed a Windows-specific tempfile bug where collision with an
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
2013-09-06 06:17:15 -07:00
Serhiy Storchaka
0127de0b87 Issue #16800: tempfile.gettempdir() no longer left temporary files when
the disk is full.  Original patch by Amir Szekely.
2013-02-13 00:34:46 +02:00
Serhiy Storchaka
beaa3adae9 Issue #10355: SpooledTemporaryFile properties and xreadline method now work for unrolled files. 2013-02-09 12:20:18 +02:00
Antoine Pitrou
a5d5bb997b Issue #12856: Ensure child processes do not inherit the parent's random seed for filename generation in the tempfile module.
Patch by Brian Harring.
2011-11-25 21:28:15 +01:00
R David Murray
b44e1841d5 Port #11488 patch from 3.1 (changeset f816841bab03) 2011-03-14 10:01:12 -04:00
Ronald Oussoren
9545a23c7f In a number of places code still revers
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).

Fixes issue #7908 for the trunk.
2010-05-05 19:09:31 +00:00
Georg Brandl
a4f46e1292 Remove unused imports in test modules. 2010-02-07 17:03:15 +00:00
Georg Brandl
d10d8ee2a1 Fix various missing import/unbound name errors. 2010-02-06 23:18:00 +00:00
Ezio Melotti
b0f5adc3f4 use assert[Not]IsInstance where appropriate 2010-01-24 16:58:36 +00:00
Ezio Melotti
aa98058cc4 use assert[Not]In where appropriate 2010-01-23 23:04:36 +00:00
Benjamin Peterson
5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Walter Dörwald
6733bed57e Make test.test_support.EnvironmentVarGuard behave like a dictionary.
All changes are mirrored to the underlying os.environ dict, but rolled back
on exit from the with block.
2009-05-01 17:35:37 +00:00
Walter Dörwald
4b965f6ab1 Use test.test_support.EnvironmentVarGuard where tests change environment vars. 2009-04-26 20:51:44 +00:00
Benjamin Peterson
888a39b54c remove test_support.TestSkipped and just use unittest.SkipTest 2009-03-26 20:48:25 +00:00
Benjamin Peterson
95287fa951 Remove some from __future__ import with_statements 2008-04-30 21:25:55 +00:00
Nick Coghlan
97fac3eb0a Issue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as context managers. (The NamedTemporaryFile fix should be considered for backporting to 2.5) 2008-02-09 15:28:09 +00:00
Armin Rigo
66d41b2fae This is probably what was meant here. 2007-12-07 19:19:55 +00:00
Collin Winter
a8785cc26a Patch #1630118: add a SpooledTemporaryFile class to tempfile. 2007-03-19 18:52:08 +00:00
Georg Brandl
4168c0466f Fix a tab. 2007-03-13 19:18:18 +00:00
Georg Brandl
35ef9c19fe Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter
which can be set to False to prevent the default delete-on-close
behavior.
2007-03-13 18:31:49 +00:00