[stdlib-sig] should we try to add argparse?
Brett Cannon
brett at python.org
Fri Sep 11 00:16:08 CEST 2009
On Thu, Sep 10, 2009 at 15:07, holger krekel <holger at merlinux.eu> wrote:
> On Thu, Sep 10, 2009 at 18:31 -0300, Collin Winter wrote:
>> On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> >
>> >> Upfront people need to realize that we might have three argument
>> >> parsing libraries for a while, but it won't be forever. If we get
>> >> argparse accepted we would slowly deprecate at least optparse, if not
>> >> getopt (lat time I tried to ditch getopt for Python 3 some argued that
>> >> getopt supported stuff optparse didn't),
>> >
>> > +0 on deprecating getopt, -1 on deprecating optparse. Breaking a
>> > perfectly functional and useful module is stupid.
>>
>> Do remember that if optparse is deprecated, it will still be available
>> for *years*. Code isn't going to suddenly break overnight. Users will
>> see this coming far, far ahead of time.
>
> i'd like to write keep writing tools that work across several
> python versions and python interpreters. how is removing
> optparse in say 2011 going to help me as a tool writer?
By letting you use argparse in new code that will eventually work
across several versions. And the deprecation can lead to moving
optparse to the Cheeseshop, meaning you only have to add a new
dependency to keep your tools running.
As Barry said in another email, if we are not going to occasionally
update the standard library to new code we are going to end up with
stuff that is rotting or odd because we had to patch around
backwards-compatibility. And if we are doing that we might as well
remove the standard library instead of wasting developer time
maintaining junk that no one uses. I for one am not ready to do that.
-Brett
More information about the stdlib-sig
mailing list