[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for explanation, Antoine. Thank you for your contribution, Amir. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset a43f67e95ef0 by Serhiy Storchaka in branch '2.7': Fix for issue #16800: Use buffered write to handle EINTR. http://hg.python.org/cpython/rev/a43f67e95ef0 New changeset 4622206db91b by Serhiy Storchaka in branch '3.2': Fix for issue #16800: Use buffe

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset b368fc93dca8 by Serhiy Storchaka in branch '2.7': Issue #16800: tempfile.gettempdir() no longer left temporary files when http://hg.python.org/cpython/rev/b368fc93dca8 New changeset 377123f10820 by Serhiy Storchaka in branch '3.2': Issue #16800: tem

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are reasons to use buffered I/O rather than os.write: os.write can fail with EINTR, for example. -- nosy: +pitrou ___ Python tracker ___

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-05 Thread Amir Szekely
Amir Szekely added the comment: I've submitted a contribution form by e-mail. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here are patches for 2.7 and 3.2 (there are some peculiarities, i.e. in exception handling). -- Added file: http://bugs.python.org/file28968/fix_tempfile_leaving_files_behind_2-2.7.patch Added file: http://bugs.python.org/file28969/fix_tempfile_

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28967/fix_tempfile_leaving_files_behind_2.patch ___ Python tracker ___ ___

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg181470 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general it looks good to me. But we can get rid of Python file and use only os.open/os.write/os.close. Here is an updated patch which carefully close a file descriptor and remove a file even if write or close failed. Amir Szekely, can you please submit a

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2013-02-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general it looks good to me. But we can get rid of Python file and use only os.open/os.write/os.close. Here is an updated patch which carefully close a file descriptor and remove a file even if write or close failed. Amir Szekely, can you please submit a

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2012-12-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) -Extension Modules stage: -> patch review versions: -Python 2.6, Python 3.1, Python 3.5 ___ Python tracker ___ _

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2012-12-27 Thread Amir Szekely
Amir Szekely added the comment: Reproduction details: [root@meh /]# uname -a Linux meh 2.6.32-131.17.1.el6-0.0.3.smp.pae.gcc4.1.x86.i686 #1 SMP Tue Dec 20 02:40:22 PST 2011 i686 GNU/Linux [root@meh /]# pwd / [root@meh /]# dd if=/dev/zero of=/tmp/BIG bs=4M dd: writing `/tmp/BIG': No space left o

[issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full

2012-12-27 Thread Amir Szekely
New submission from Amir Szekely: tempfile._get_default_tempdir() tries to find a good temporary directory by attempting to create a file and write a string into it for all candidate directories. It deletes those files right after closing them. But if writing rather than creating them fails, t