[stdlib-sig] should we try to add argparse?

Barry Warsaw barry at python.org
Fri Sep 11 00:11:21 CEST 2009


On Sep 10, 2009, at 5:44 PM, Antoine Pitrou wrote:

> Le jeudi 10 septembre 2009 à 17:30 -0400, Barry Warsaw a écrit :
>> Why does deprecation == breaking?
>
> Well, you have to rewrite your code one day. And since optparse is
> *very* widely used, tons of users will be impacted. Python is often  
> used
> as a scripting language, even for small one-off scripts that nobody
> wants or even knows to maintain.
>
> Besides, any spurious message on the standard output breaks things  
> like
> cron scripts, so even the deprecation period can be annoying.
>
> Please do not assume that every Python program is a well-maintained
> application with dedicated full-time developers...

Then we have a serious long term problem.  Taken to its logical  
conclusion, we're going to end up with a batteries included standard  
library with nothing but old, /effectively/ obsolete APIs with all the  
good new stuff that people want in the Cheeseshop.  Okay, in reality  
it will always be a mix, but I do think this policy means that the  
APIs in the stdlib will degrade and ultimately decay over time.

If that's the case, why even have a stdlib?

>> If you want to continue using optparse, that'll be fine for what?
>> 18-36 months or so?  It's a trivial amount of work to port from
>> optparse to argparse.
>
> Ok, if it's trivial then perhaps I'd reconsider my opinion.
> Is there a compatibility API?

I don't believe so, but I think the changes could be more or less  
mechanically applied. Maybe we should be extending the basic 2to3  
technology to include API upgrades?

> (please note we have e.g. a lot of XML parsing libraries in the  
> stdlib,
> and nobody seems in a hurry to deprecate them)

opening-that-old-can-of-worms-ly y'rs,
-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 832 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/stdlib-sig/attachments/20090910/77953481/attachment.pgp>


More information about the stdlib-sig mailing list