This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Name collision handling in tempfile is not covered by tests
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, eli.bendersky, ezio.melotti, georg.brandl, ncoghlan, python-dev, r.david.murray, vlad
Priority: normal Keywords: patch

Created on 2013-09-06 09:34 by vlad, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tempfile_collision_tests.patch vlad, 2013-09-11 13:46 applies cleanly to 3.3 and 3.4; can be rebased on 2.7 with trivial conflicts review
tempfile_collision_tests_27 vlad, 2013-09-13 13:14
Messages (11)
msg197062 - (view) Author: Vlad Shcherbina (vlad) * Date: 2013-09-06 09:34
I intend to add test for (existing dir)-(new file) collision in http://bugs.python.org/issue18849, but file-file, file-dir and dir-dir collisions are yet to be covered.
msg197153 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-09-07 12:45
Do you want to submit a patch to add tests for these cases?
msg197159 - (view) Author: Vlad Shcherbina (vlad) * Date: 2013-09-07 13:22
Probably yes, I'm just not sure when I'll get the time.
msg197565 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-13 12:30
New changeset 63f25483c8f6 by Eli Bendersky in branch '3.3':
Issue #18945: Add tests for tempfile name collision handling.
http://hg.python.org/cpython/rev/63f25483c8f6

New changeset c902ceaf7825 by Eli Bendersky in branch 'default':
Issue #18945: Add tests for tempfile name collision handling.
http://hg.python.org/cpython/rev/c902ceaf7825
msg197566 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2013-09-13 12:32
Thanks Vlad, committed to 3.3/3.4; would you like to provide the 2.7 patch?
msg197569 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-09-13 13:28
We don't generally backport tests unless they are part of a bug fix.  It's not a blanket prohibition, but normally the risk of false positives in a maintenance release on platforms not covered by our buildbots outweighs the benefits of adding the tests.
msg197573 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2013-09-13 13:36
On Fri, Sep 13, 2013 at 6:28 AM, R. David Murray <report@bugs.python.org>wrote:

>
> R. David Murray added the comment:
>
> We don't generally backport tests unless they are part of a bug fix.  It's
> not a blanket prohibition, but normally the risk of false positives in a
> maintenance release on platforms not covered by our buildbots outweighs the
> benefits of adding the tests.
>

These tests are very related to an actual bug-fix (
http://bugs.python.org/issue18849). Moreover, they cover a previously
uncovered feature which resulted in very intermittent heisen-bugs where
temp file creation was occasionally failing on some platforms. IMHO having
this covered is worth the small maintenance burden of the tests - who
knows, it may uncover real problems. What do you think?
msg197582 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-09-13 14:31
If they are part of a bug fix, then sure.  That wasn't clear from this issue, though.  On the other hand, if the tests in that other issue cover the actual bug, and these have any chance of *introducing* test failures (especially if they are heisenburgs, although I'm assuming the point is that they are not), then I'd say no.  The issue with backporting tests isn't about "maintenance burden" (backporting tests actually makes the maintenance burden smaller, not larger).  The issue is potential effectively spurious test failures in the field in a maintenance release.

To put it another way: the right place to find test bugs is in a feature release, which we then fix in the next maintenance release.  We do *not* want to find test bugs in maintenance releases.
msg197608 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2013-09-13 16:12
Benjamin, what do you think?
msg197727 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2013-09-14 19:21
I don't object to adding the tests.
msg197814 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-15 19:08
New changeset fa54069eb8c4 by Eli Bendersky in branch '2.7':
Close #18945: Add tests for tempfile name collision handling.
http://hg.python.org/cpython/rev/fa54069eb8c4
History
Date User Action Args
2022-04-11 14:57:50adminsetgithub: 63145
2013-09-15 19:08:40python-devsetstatus: open -> closed
resolution: fixed
messages: + msg197814

stage: test needed -> resolved
2013-09-14 19:21:22benjamin.petersonsetmessages: + msg197727
2013-09-13 16:12:32eli.benderskysetnosy: + benjamin.peterson
messages: + msg197608
2013-09-13 14:31:51r.david.murraysetmessages: + msg197582
2013-09-13 13:36:45eli.benderskysetmessages: + msg197573
2013-09-13 13:28:25r.david.murraysetnosy: + r.david.murray
messages: + msg197569
2013-09-13 13:14:54vladsetfiles: + tempfile_collision_tests_27
2013-09-13 12:32:12eli.benderskysetmessages: + msg197566
2013-09-13 12:30:20python-devsetnosy: + python-dev
messages: + msg197565
2013-09-11 13:49:12vladsetfiles: - tempfile_collision_tests.patch
2013-09-11 13:46:04vladsetfiles: + tempfile_collision_tests.patch
2013-09-09 13:53:19vladsetfiles: + tempfile_collision_tests.patch
keywords: + patch
2013-09-07 13:35:29pitrousetnosy: + georg.brandl, ncoghlan
2013-09-07 13:22:26vladsetmessages: + msg197159
2013-09-07 12:45:20ezio.melottisetnosy: + ezio.melotti

messages: + msg197153
stage: test needed
2013-09-06 14:20:34eli.benderskysetnosy: + eli.bendersky
2013-09-06 09:34:12vladcreate