Martin Panter
b6b1ab4fa8
Issue #26385 : Cleanup NamedTemporaryFile if fdopen() fails, by SilentGhost
2016-02-29 00:31:38 +00:00
Martin Panter
be9ddc1d11
Issue #26261 : Clarify NamedTemporaryFile name attribute vs file.name
2016-02-22 10:10:00 +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
Serhiy Storchaka
1aa2c0f073
Issue #23865 : close() methods in multiple modules now are idempotent and more
...
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:24:10 +03:00
Yury Selivanov
6e7c14013a
tempfile: Fix docstring. Issue #21397 , patch by R. David Murray.
2014-09-26 17:07:39 -04:00
Victor Stinner
dd48b902bb
Issue #21058 : NamedTemporaryFile() closes the FD on any error, not only Exception
2014-03-25 09:10:59 +01: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
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
Terry Jan Reedy
6c1d9dd566
Tempfile.py: stop buildbot warning about using deprecated xreadlines.
...
The slightly odd behavior (the validity of passing a sizehint depends on the
type of self._file) was kept to avoid breaking code that depends on it.
Test_tempfile.test_xreadlines passes (along with everything else).
2013-06-30 13:57:57 -04:00
Ezio Melotti
4dbcec9dd1
Fix deprecation warning in tempfile.
2013-02-23 08:16:07 +02:00
Serhiy Storchaka
7d360038f5
Fix for issue #16800 : Use buffered write to handle EINTR.
2013-02-13 00:59:11 +02: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
Benjamin Peterson
4f24767938
proxy the __exit__ call
2009-07-01 13:34:35 +00:00
Benjamin Peterson
31f42ab254
provide a dummy __exit__ on windows
2009-06-30 22:14:33 +00:00
Ronald Oussoren
81af68ee61
Remove references to platform 'mac'
...
The 'mac' platform (that is, os.name == 'mac') was used for the MacOS 9 port,
which is no longer supported (as of Python 2.4 IIRC).
2008-05-12 11:24:33 +00:00
Skip Montanaro
ea59a84244
A few small changes:
...
* The only exception we should catch when trying to import cStringIO is an
ImportError.
* Delete the function signatures embedded in the mk*temp docstrings.
* The tempdir global variable was initialized twice.
2008-04-27 22:49:56 +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
Neal Norwitz
0d4c06e06e
Whitespace normalization. Ugh, we really need to do this more often.
...
You might want to review this change as it's my first time. Be gentle. :-)
2007-04-25 06:30:05 +00:00
Collin Winter
a8785cc26a
Patch #1630118 : add a SpooledTemporaryFile class to tempfile.
2007-03-19 18:52:08 +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
Collin Winter
9b2a109540
Patch #1668482 : don't use '-' in mkstemp
2007-03-08 22:16:25 +00:00
Neal Norwitz
946aea2cd5
Param name is dir, not directory. Update docstring. Backport candidate
2006-06-16 04:31:06 +00:00
Martin v. Löwis
879768dd97
Change WindowsError to carry the Win32 error code in winerror,
...
and the DOS error code in errno. Revert changes where
WindowsError catch blocks unnecessarily special-case OSError.
2006-05-11 13:28:43 +00:00