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.

Author Yaniv.Aknin
Recipients BitTorment, Yaniv.Aknin, alanmcintyre, brtzsnr, georg.brandl, techtonik
Date 2010-04-08.00:02:05
SpamBayes Score 2.3247404e-11
Marked as misclassified No
Message-id <>
This affect 3.x as well.

Regardless of the exact version this will come out in, I think the only proper solution is one with which we eventually, maybe in two versions' time, end up with a behaviour that raises an exception upon double insertion. Also, we should leave some switch to allow double insertions (as someone may /want/ to create a peculiar file). If we agree that's a worthy end goal, let's see what deprecation path we take to get there.

I feel PEP4/PEP5 cover more significant changes to the language/stdlib than this, but in their spirit I propose the following concrete solution: For the nearest possible version let's issue a DeprecationWarning when adding dual files and provide a global switch that will change the DeprecationWarning into raising a relevant exception instead. For the version after that, let's remove the DeprecationWarning warning altogether and choose one of these behaviours:
 (a) a global switch that will raise by default
 (b) a switch in ZipFile's __init__() that will raise by default
 (c) a switch in ZipFile's write() that will raise by default

I vote for (c), but I think the delta between the options is small.

If this is agreeable with the audience, I'll be happy to produce a patch against 2.7 and 3.2 that will provide the chosen behaviour, as well as change tests and documentation accordingly. I realize that time is of the essence if we want this included in 2.7, and I'll be happy to do the work in a timely manner, so if you're interested kindly let me know what you feel while the iron's hot. Either way, I'll be happy to see it in any future version.

Regarding the behaviour brtzsnr observed, I think it's a separate bug. I'll try to reproduce this behaviour, and open a separate ticket if I manage to do so.

blah. Small bug, many words!
Date User Action Args
2010-04-08 00:02:09Yaniv.Akninsetrecipients: + Yaniv.Aknin, georg.brandl, alanmcintyre, techtonik, BitTorment, brtzsnr
2010-04-08 00:02:09Yaniv.Akninsetmessageid: <>
2010-04-08 00:02:07Yaniv.Akninlinkissue2824 messages
2010-04-08 00:02:05Yaniv.Aknincreate