On Fri, Nov 6, 2009 at 3:24 PM, Georg Brandl <g.brandl@gmx.net> wrote:
Guido van Rossum schrieb:
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
Trying to import hashlib and importing md5 on ImportError isn't *too* unclean, is it?
That's not all -- you also have to modify the code that uses the module, unless you use "import as", which has problems of its own. Plus, I may not care (yet) about supporting 2.7, and yet I am forced to change my code to cleanly support 2.6. I really don't like it. -- --Guido van Rossum (python.org/~guido)