[Python-Dev] Deprecated xmllib module
carribeiro at gmail.com
Sun Dec 5 18:42:45 CET 2004
On Sun, 5 Dec 2004 05:40:16 -0500, Raymond Hettinger <python at rcn.com> wrote:
> * Deprecated modules just get moved to the lib-old directory. If
> someone has ancient code relying on the module, it is a somewhat trivial
> maintenance step to add lib-old to their PYTHONPATH. IOW, I fail to see
> the harm.
In principle, that's a good idea, but I don't know if it's really
practical. I fear that the distribution would end up simply adding
lib-old to the PYTHONPATH anyway :-) But some variations may be worth
1) Deprecated modules would first generate a warning (as it is today).
On future versions, instead of being removed, the level of the warning
would be raised, causing a fatal exception (an ImportError?), unless
explicitly configured otherwise (using a config file or some similar
mechanism). I believe that the current warnings module already
provides a good basis for this implementation.
(IOW - the module would still be there, and could be activated, but
it's "off" by default. Turning it on again has to be easy, though. And
the message on "ImportError" have to meaningful for non-technical
users, allowing for easier support in these situations)
2) Split the documentation: the "old-and-deprecated" modules would be
listed separated from the active & recommended ones, as a different
section, or even as a separate book. That would be a clear sign to new
users to keep in mind while they read the documentation, perhaps more
effective than writing the deprecation warning on the top of the page.
Consultoria em Projetos
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com
More information about the Python-Dev