deprecation for early adopters

Martin Blais blais at iro.umontreal.ca
Mon Feb 17 08:07:49 EST 2003


hi

wouldn't it be great if there was module that would check for use of 
deprecated code?  has anyone made such a beast that my googling hasn't found?

i noticed that there are already some DeprecationWarning's in the code, and i 
read PEP4, but unfortunately there are some deprecated modules (or deprecated 
according to their documentation, anyway) that don't spurt anything if you 
use them (e.g. whrandom, gopherlib).

i'm thinking of something along the following lines:
,----
| import ...
| import ...
| import ...
| 
| # check heavily for everything deprecated, for deprecated we want not be.
| import deprecated; deprecated.checkall()
`----

where module deprecated would check for a hard-coded list of stuff... and 
maintained accordingly.  does it make sense?  how would you go about 
implementing this?  i was thinking of checking for modules in the global 
dictionary, and then perhaps to find a way to somehow replace deprecated 
functions from non-deprecated modules.

any comments welcome.
cheers,

--
M.

P.S. please Cc replies to blais at iro.umontreal.ca, i'm not on the list just 
yet.





More information about the Python-list mailing list