From ubershmekel at gmail.com Thu Sep 10 02:38:01 2009
From: ubershmekel at gmail.com (Yuvgoog Greenle)
Date: Thu, 10 Sep 2009 03:38:01 +0300
Subject: [stdlib-sig] Pyopt - command-line options that are alot easier than
optparse
Message-ID: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
Hi stdlib-sig,
I wanted to ease exposing functions to the command-line using python 3
features and the result is http://code.google.com/p/pyopt/
I think this could be good stuff for the
standard library and I'm not sure how to go about it, should I work on
integrating with optparse/optik (is that project still active?) or should
this be a separate module?
This is an example usage of pyopt.0.71:
---
import pyopt
expose = pyopt.Exposer()
@expose.args
def possy(archer:str, boulder:float, magic:int=42):
"""Shows an example positional command-line function.
archer - is a str
boulder - should be a float
magic - a number that is magical"""
print(repr(archer), repr(boulder), repr(magic))
if __name__ == "__main__":
expose.run()
---
And this is what you get:
C:\>example.py -h
Usage: example.py archer boulder [magic]
Shows an example positional command-line function.
archer - is a str
boulder - should be a float
magic - a number that is magical
C:\>example.py 1 2 3
'1' 2.0 3
C:\>example.py 1 2
'1' 2.0 42
C:\>example.py 5
2 arguments required, got only 1. Run with ? or -h for more help.
---
For more examples and functionality (like multiple functions) look at:
http://code.google.com/p/pyopt/wiki/Examples
Notes:
1. I know the names aren't perfect (module pyopt, class Exposer and the
decorator methods args/kwargs/mixed). Please reply if you have better names
in mind.
2. I realize this isn't as flexible as optparse and passing options around
multiple different sub-functions is harder. This module is strictly a quick
and clean solution to a very day-to-day use case: bridging python functions
to command-line.
3. Feedback would be greatly appreciated. I would like to know if I'm the
only one who's tired of sys.argv/optparse boilerplate.
--
Yuv
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brett at python.org Thu Sep 10 03:27:51 2009
From: brett at python.org (Brett Cannon)
Date: Wed, 9 Sep 2009 18:27:51 -0700
Subject: [stdlib-sig] Pyopt - command-line options that are alot easier
than optparse
In-Reply-To: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
Message-ID:
On Wed, Sep 9, 2009 at 17:38, Yuvgoog Greenle wrote:
> Hi stdlib-sig,
> I wanted to ease exposing functions to the command-line using python 3
> features and the result is?http://code.google.com/p/pyopt/
> I think this could be good stuff for the standard library and I'm not sure
> how to go about it, should I work on integrating with optparse/optik (is
> that project still active?)
No, Optik simply became optparse.
> or should this be a separate module?
If you are simply asking for design advice, this is not the proper
place to ask. If you are wanting to get this module accepted into the
standard library it needs to have existed for some time and become
accepted by the Python community as the best solution for command-line
argument parsing.
-Brett
> This is an example usage of pyopt.0.71:
> ---
> import pyopt
> expose = pyopt.Exposer()
> @expose.args
> def possy(archer:str, boulder:float, magic:int=42):
> ?? ?"""Shows an example positional command-line function.
> ?? ? ? ?archer - is a str
> ?? ? ? ?boulder - should be a float
> ?? ? ? ?magic - a number that is magical"""
> ?? ?print(repr(archer), repr(boulder), repr(magic))
> if __name__ == "__main__":
> ?? ?expose.run()
> ---
> And this is what you get:
> C:\>example.py -h
> Usage: example.py archer boulder [magic]
> ?? ? ? ?Shows an example positional command-line function.
> ?? ? ? ?archer - is a str
> ?? ? ? ?boulder - should be a float
> ?? ? ? ?magic - a number that is magical
> C:\>example.py 1 2 3
> '1' 2.0 3
> C:\>example.py 1 2
> '1' 2.0 42
> C:\>example.py 5
> 2 arguments required, got only 1. Run with ? or -h for more help.
> ---
> For more examples and functionality (like multiple functions) look at:
> http://code.google.com/p/pyopt/wiki/Examples
> Notes:
> 1. I know the names aren't perfect?(module pyopt, class Exposer and the
> decorator methods args/kwargs/mixed). Please reply if you have better names
> in mind.
> 2. I realize this isn't as flexible as optparse and passing options around
> multiple different sub-functions is harder. This module is strictly a quick
> and clean solution to a very day-to-day use case: bridging python functions
> to command-line.
> 3. Feedback would be greatly appreciated. I would like to know if I'm the
> only one who's tired of sys.argv/optparse boilerplate.
> --
> Yuv
>
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
>
From michael at voidspace.org.uk Thu Sep 10 11:21:33 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 10:21:33 +0100
Subject: [stdlib-sig] Pyopt - command-line options that are alot easier
than optparse
In-Reply-To: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
Message-ID: <4AA8C51D.3080902@voidspace.org.uk>
Yuvgoog Greenle wrote:
> Hi stdlib-sig,
>
> I wanted to ease exposing functions to the command-line using python 3
> features and the result is http://code.google.com/p/pyopt/
>
> I think this could be good stuff for the standard library and I'm not
> sure how to go about it, should I work on integrating with
> optparse/optik (is that project still active?) or should this be a
> separate module?
For a module to be accepted into the standard library it typically
already needs to be in use by the Python community and recognised as
'best-of-breed'.
*Personally* I would like to see argparse in the standard library as I
think it is currently the best Python argument parsing library, but that
is just my opinion. As we already have two argument parsing libraries in
the standard library (getopt and optparse) the addition of a third for
the *same* task is highly unlikely.
On the other hand, if you can provide your functionality as an addon-for
optparse - retaining full backwards compatibility - then it may be
accepted as an extension of the existing module rather than as a new one
(a much lower bar).
All the best,
Michael Foord
>
> This is an example usage of pyopt.0.71:
> ---
> import pyopt
> expose = pyopt.Exposer()
>
> @expose.args
> def possy(archer:str, boulder:float, magic:int=42):
> """Shows an example positional command-line function.
> archer - is a str
> boulder - should be a float
> magic - a number that is magical"""
> print(repr(archer), repr(boulder), repr(magic))
>
> if __name__ == "__main__":
> expose.run()
>
> ---
> And this is what you get:
>
> C:\>example.py -h
> Usage: example.py archer boulder [magic]
> Shows an example positional command-line function.
> archer - is a str
> boulder - should be a float
> magic - a number that is magical
>
> C:\>example.py 1 2 3
> '1' 2.0 3
>
> C:\>example.py 1 2
> '1' 2.0 42
>
> C:\>example.py 5
> 2 arguments required, got only 1. Run with ? or -h for more help.
> ---
>
> For more examples and functionality (like multiple functions) look at:
> http://code.google.com/p/pyopt/wiki/Examples
>
> Notes:
> 1. I know the names aren't perfect (module pyopt, class Exposer and
> the decorator methods args/kwargs/mixed). Please reply if you have
> better names in mind.
> 2. I realize this isn't as flexible as optparse and passing options
> around multiple different sub-functions is harder. This module is
> strictly a quick and clean solution to a very day-to-day use case:
> bridging python functions to command-line.
> 3. Feedback would be greatly appreciated. I would like to know if I'm
> the only one who's tired of sys.argv/optparse boilerplate.
>
> --
> Yuv
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
From holger at merlinux.eu Thu Sep 10 12:03:00 2009
From: holger at merlinux.eu (holger krekel)
Date: Thu, 10 Sep 2009 12:03:00 +0200
Subject: [stdlib-sig] Pyopt - command-line options that are alot
easier than optparse
In-Reply-To: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
Message-ID: <20090910100300.GQ15455@trillke.net>
Hi Yuvgoog!,
On Thu, Sep 10, 2009 at 03:38 +0300, Yuvgoog Greenle wrote:
> Hi stdlib-sig,
> I wanted to ease exposing functions to the command-line using python 3
> features and the result is http://code.google.com/p/pyopt/
>
> I think this could be good stuff for the
> standard library and I'm not sure how to go about it, should I work on
> integrating with optparse/optik (is that project still active?) or should
> this be a separate module?
>
> This is an example usage of pyopt.0.71:
> ---
> import pyopt
> expose = pyopt.Exposer()
>
> @expose.args
> def possy(archer:str, boulder:float, magic:int=42):
> """Shows an example positional command-line function.
> archer - is a str
> boulder - should be a float
> magic - a number that is magical"""
> print(repr(archer), repr(boulder), repr(magic))
>
> if __name__ == "__main__":
> expose.run()
interesting! If i were you i'd not bother with the standard
library but just publish the module and project on PyPI.
With two other packages already in it si hard to add
a third and making an extension to optparse is probably
a hassle.
btw, myself i'd only use it if it also works <3.0.
A similar idea i had was this, btw:
@cmdline
def main(archer=str, boulder=float, magic=42):
which would wrap a parser around the function
and otherwise work like your example. This can
easily work down to Python2.3.
cheers,
holger
From barry at python.org Thu Sep 10 15:05:28 2009
From: barry at python.org (Barry Warsaw)
Date: Thu, 10 Sep 2009 09:05:28 -0400
Subject: [stdlib-sig] Pyopt - command-line options that are alot easier
than optparse
In-Reply-To: <4AA8C51D.3080902@voidspace.org.uk>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
<4AA8C51D.3080902@voidspace.org.uk>
Message-ID: <05CAF8FF-B55D-4A71-85F6-318029B3D4B7@python.org>
On Sep 10, 2009, at 5:21 AM, Michael Foord wrote:
> *Personally* I would like to see argparse in the standard library as
> I think it is currently the best Python argument parsing library,
> but that is just my opinion. As we already have two argument parsing
> libraries in the standard library (getopt and optparse) the addition
> of a third for the *same* task is highly unlikely.
Huge +1 for argparse. It exists, seems rock solid, easy to use
(amazing for an argument parsing library), supports subcommands
easily, is easy to port from optparse usage, and just full of
awesomeness.
-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:
From orsenthil at gmail.com Thu Sep 10 15:16:56 2009
From: orsenthil at gmail.com (Senthil Kumaran)
Date: Thu, 10 Sep 2009 18:46:56 +0530
Subject: [stdlib-sig] Pyopt - command-line options that are alot
easier than optparse
In-Reply-To: <05CAF8FF-B55D-4A71-85F6-318029B3D4B7@python.org>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
<4AA8C51D.3080902@voidspace.org.uk>
<05CAF8FF-B55D-4A71-85F6-318029B3D4B7@python.org>
Message-ID: <20090910131656.GC20066@ubuntu.ubuntu-domain>
On Thu, Sep 10, 2009 at 09:05:28AM -0400, Barry Warsaw wrote:
>
>> *Personally* I would like to see argparse in the standard library as I
>> think it is currently the best Python argument parsing library, but
>> that is just my opinion. As we already have two argument parsing
>> libraries in the standard library (getopt and optparse) the addition
>> of a third for the *same* task is highly unlikely.
>
> Huge +1 for argparse. It exists, seems rock solid, easy to use (amazing
> for an argument parsing library), supports subcommands easily, is easy to
> port from optparse usage, and just full of awesomeness.
Based on this discussion, I think we need to reopen this bug:
http://bugs.python.org/issue6247
We already seem to have couple of +1s ( while personally I am 0, as I
have never had requirement to use argparse and most often my needs
were served by optparse).
It would be required to convince MvL, to include argparse in stdlib.
But I hate the very idea of three modules doing the same job! (even
if one does something better than the other).
--
Senthil
I tripped over a hole that was sticking up out of the ground.
From brett at python.org Thu Sep 10 20:56:36 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 11:56:36 -0700
Subject: [stdlib-sig] should we try to add argparse?
Message-ID:
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), out of the standard library
and toss them into PyPI for those who refuse to switch. The standard
library might not evolve a lot, but it isn't dead or in stone.
But before this can happen, people need to have a general consensus
that I should bug Steven about contributing as it will require a PEP
from him. Steven already has commit privileges to maintenance from him
will not be a problem.
So if you want this to actually happen and for me to start talking to
Steven just reply to this email w/ a vote.
I am +0
From michael at voidspace.org.uk Thu Sep 10 21:30:06 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 20:30:06 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <4AA953BE.1080908@voidspace.org.uk>
Brett Cannon 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), out of the standard library
> and toss them into PyPI for those who refuse to switch. The standard
> library might not evolve a lot, but it isn't dead or in stone.
>
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
>
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
>
> I am +0
>
+1
Michael
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From theller at ctypes.org Thu Sep 10 21:59:27 2009
From: theller at ctypes.org (Thomas Heller)
Date: Thu, 10 Sep 2009 21:59:27 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <4AA95A9F.9060209@ctypes.org>
Brett Cannon schrieb:
> 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), out of the standard library
> and toss them into PyPI for those who refuse to switch. The standard
> library might not evolve a lot, but it isn't dead or in stone.
>
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
>
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
>
> I am +0
I have not used argparse, but I am missing a feature that is needed
on Windows: It should be possible to mark option flags
not only with a '-' sign (or a '--' sign) but also with a '/' sign,
plus it should be possible to have case-insensitive parsing of option
names. So that '-regserver', '/regserver' and '/RegServer' all
mean the same thing.
Does argparse allow this?
--
Thanks,
Thomas
From jbaker at zyasoft.com Thu Sep 10 22:07:07 2009
From: jbaker at zyasoft.com (Jim Baker)
Date: Thu, 10 Sep 2009 14:07:07 -0600
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA953BE.1080908@voidspace.org.uk>
References:
<4AA953BE.1080908@voidspace.org.uk>
Message-ID:
+1 - modernization is good. optparse was very good in its time, but too
clunky now
On Thu, Sep 10, 2009 at 1:30 PM, Michael Foord wrote:
> Brett Cannon 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), out of the standard library
>> and toss them into PyPI for those who refuse to switch. The standard
>> library might not evolve a lot, but it isn't dead or in stone.
>>
>> But before this can happen, people need to have a general consensus
>> that I should bug Steven about contributing as it will require a PEP
>> from him. Steven already has commit privileges to maintenance from him
>> will not be a problem.
>>
>> So if you want this to actually happen and for me to start talking to
>> Steven just reply to this email w/ a vote.
>>
>> I am +0
>>
>>
>
> +1
>
> Michael
>
> _______________________________________________
>> stdlib-sig mailing list
>> stdlib-sig at python.org
>> http://mail.python.org/mailman/listinfo/stdlib-sig
>>
>>
>
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
>
>
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
Jim Baker
jbaker at zyasoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From barry at python.org Thu Sep 10 22:27:35 2009
From: barry at python.org (Barry Warsaw)
Date: Thu, 10 Sep 2009 16:27:35 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <89E62C37-2ADF-4744-9056-9805345A1102@python.org>
On Sep 10, 2009, at 2:56 PM, Brett Cannon wrote:
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
+1
-------------- 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:
From holger at merlinux.eu Thu Sep 10 22:55:27 2009
From: holger at merlinux.eu (holger krekel)
Date: Thu, 10 Sep 2009 22:55:27 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <20090910205527.GB15455@trillke.net>
On Thu, Sep 10, 2009 at 11:56 -0700, Brett Cannon 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), out of the standard library
> and toss them into PyPI for those who refuse to switch. The standard
> library might not evolve a lot, but it isn't dead or in stone.
>
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
>
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
-0 because i think it's a questionable effort/value ratio.
holger
From brett at python.org Thu Sep 10 22:36:53 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 13:36:53 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA95A9F.9060209@ctypes.org>
References:
<4AA95A9F.9060209@ctypes.org>
Message-ID:
On Thu, Sep 10, 2009 at 12:59, Thomas Heller wrote:
> Brett Cannon schrieb:
>> 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), out of the standard library
>> and toss them into PyPI for those who refuse to switch. The standard
>> library might not evolve a lot, but it isn't dead or in stone.
>>
>> But before this can happen, people need to have a general consensus
>> that I should bug Steven about contributing as it will require a PEP
>> from him. Steven already has commit privileges to maintenance from him
>> will not be a problem.
>>
>> So if you want this to actually happen and for me to start talking to
>> Steven just reply to this email w/ a vote.
>>
>> I am +0
>
> I have not used argparse, but I am missing a feature that is needed
> on Windows: ?It should be possible to mark option flags
> not only with a '-' sign (or a '--' sign) but also with a '/' sign,
> plus it should be possible to have case-insensitive parsing of option
> names. ?So that '-regserver', '/regserver' and '/RegServer' all
> mean the same thing.
>
> Does argparse allow this?
According to http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
it does.
-Brett
From theller at ctypes.org Thu Sep 10 23:10:26 2009
From: theller at ctypes.org (Thomas Heller)
Date: Thu, 10 Sep 2009 23:10:26 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<4AA95A9F.9060209@ctypes.org>
Message-ID: <4AA96B42.7070502@ctypes.org>
>> I have not used argparse, but I am missing a feature that is needed
>> on Windows: It should be possible to mark option flags
>> not only with a '-' sign (or a '--' sign) but also with a '/' sign,
>> plus it should be possible to have case-insensitive parsing of option
>> names. So that '-regserver', '/regserver' and '/RegServer' all
>> mean the same thing.
>>
>> Does argparse allow this?
>
> According to http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
> it does.
Then it gets a +1 from me.
--
Thanks,
Thomas
From solipsis at pitrou.net Thu Sep 10 23:14:59 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Thu, 10 Sep 2009 23:14:59 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <1252617299.5933.0.camel@localhost>
> 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.
From michael at voidspace.org.uk Thu Sep 10 23:22:09 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 22:22:09 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252617299.5933.0.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
Message-ID: <4AA96E01.2020601@voidspace.org.uk>
Antoine Pitrou 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.
>
>
So we're stuck with inferior technology?
Michael
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From benjamin at python.org Thu Sep 10 23:25:53 2009
From: benjamin at python.org (Benjamin Peterson)
Date: Thu, 10 Sep 2009 16:25:53 -0500
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA96E01.2020601@voidspace.org.uk>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk>
Message-ID: <1afaf6160909101425p14970423o3b202bd7207a16db@mail.gmail.com>
2009/9/10 Michael Foord :
> Antoine Pitrou 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.
>>
>>
>
> So we're stuck with inferior technology?
No, that's never been the case. Download and install argparse.
--
Regards,
Benjamin
From michael at voidspace.org.uk Thu Sep 10 23:27:38 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 22:27:38 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1afaf6160909101425p14970423o3b202bd7207a16db@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk>
<1afaf6160909101425p14970423o3b202bd7207a16db@mail.gmail.com>
Message-ID: <4AA96F4A.9020804@voidspace.org.uk>
Benjamin Peterson wrote:
> 2009/9/10 Michael Foord :
>
>> Antoine Pitrou 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.
>>>
>>>
>>>
>> So we're stuck with inferior technology?
>>
>
> No, that's never been the case. Download and install argparse.
>
>
>
>
I was talking about in the standard library.
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From brett at python.org Thu Sep 10 23:29:17 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 14:29:17 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252617299.5933.0.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
Message-ID:
On Thu, Sep 10, 2009 at 14:14, Antoine Pitrou 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.
Fine, but that doesn't say anything about whether you think adding
argparse is a good idea.
-Brett
From solipsis at pitrou.net Thu Sep 10 23:33:49 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Thu, 10 Sep 2009 23:33:49 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA96E01.2020601@voidspace.org.uk>
References:
<1252617299.5933.0.camel@localhost> <4AA96E01.2020601@voidspace.org.uk>
Message-ID: <1252618429.5933.10.camel@localhost>
Le jeudi 10 septembre 2009 ? 22:22 +0100, Michael Foord a ?crit :
> > +0 on deprecating getopt, -1 on deprecating optparse. Breaking a
> > perfectly functional and useful module is stupid.
> >
> >
>
> So we're stuck with inferior technology?
We aren't! I'm theoretically ok with putting argparse in the stdlib (I
say theoretically because I didn't bother to look it up). I'm not ok
with deprecating optparse in the process, because it's a a perfectly
good and widely used alternative. Forcing users to rewrite their code
just because we think we can come up with something smarter than what
they use is *not* nice.
On the other hand, getopt's API is so archaic that deprecating it seems
warranted.
From barry at python.org Thu Sep 10 23:30:43 2009
From: barry at python.org (Barry Warsaw)
Date: Thu, 10 Sep 2009 17:30:43 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252617299.5933.0.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
Message-ID:
On Sep 10, 2009, at 5:14 PM, Antoine Pitrou wrote:
> +0 on deprecating getopt, -1 on deprecating optparse. Breaking a
> perfectly functional and useful module is stupid.
Why does deprecation == breaking?
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. We have a process for deprecating modules, so
let's follow that and migrate to the much better library.
-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:
From collinw at gmail.com Thu Sep 10 23:31:28 2009
From: collinw at gmail.com (Collin Winter)
Date: Thu, 10 Sep 2009 18:31:28 -0300
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252617299.5933.0.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
Message-ID: <43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou 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.
How many more ways do we need to do argument parsing? If argparse is
added, I'd like to see both getopt and optparse begin their
deprecation cycles in the same release. Three separate ways of doing
argument parsing in the stdlib is madness.
Collin Winter
From michael at voidspace.org.uk Thu Sep 10 23:33:13 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 22:33:13 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
References: <1252617299.5933.0.camel@localhost>
<43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
Message-ID: <4AA97099.1020406@voidspace.org.uk>
Collin Winter wrote:
> On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou 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.
>
> How many more ways do we need to do argument parsing? If argparse is
> added, I'd like to see both getopt and optparse begin their
> deprecation cycles in the same release. Three separate ways of doing
> argument parsing in the stdlib is madness.
>
+1 to deprecating both.
Michael
> Collin Winter
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From brett at python.org Thu Sep 10 23:35:17 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 14:35:17 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost>
<43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
Message-ID:
On Thu, Sep 10, 2009 at 14:31, Collin Winter wrote:
> On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou 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 suspect we would do at least one release as
PendingDeprecationWarning, and one with DeprecationWarning. But there
is a much bigger chance they will stay w/ DeprecationWarning for a
couple of releases. Plus the code will be made available on PyPI for
people to download and use on their own w/ no deprecation warning.
> How many more ways do we need to do argument parsing? If argparse is
> added, I'd like to see both getopt and optparse begin their
> deprecation cycles in the same release. Three separate ways of doing
> argument parsing in the stdlib is madness.
So would I. I looked up the original arguments against removing getopt
for Python 3 so we can make sure everyone is happy w/ ditching both
modules.
-Brett
From mal at egenix.com Thu Sep 10 23:36:30 2009
From: mal at egenix.com (M.-A. Lemburg)
Date: Thu, 10 Sep 2009 23:36:30 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA96E01.2020601@voidspace.org.uk>
References: <1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk>
Message-ID: <4AA9715E.8080403@egenix.com>
Michael Foord wrote:
> Antoine Pitrou 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.
>>
>>
>
> So we're stuck with inferior technology?
If you have the choice between breaking backwards compatibility
and downloading other implementations from PyPI, I think backwards
compatibility counts more.
We've just had a major change in the stdlib for 3.x. Then the 3.0
release was ditched due to poor performance. If we now start
deprecating widely used modules in 3.2, we're going to lose
a major pro argument for using Python: that of a stable eco system
to write code for.
I don't think we should deprecate any commonly used module (in the
3.x branch) unless there's a clear and documented migration path
or -even better- a migration wrapper available for the deprecated
module.
The next major round of refactoring will have to wait for
Python 4.x.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 09 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
From michael at voidspace.org.uk Thu Sep 10 23:39:02 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 22:39:02 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA9715E.8080403@egenix.com>
References: <1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
Message-ID: <4AA971F6.8060707@voidspace.org.uk>
M.-A. Lemburg wrote:
> Michael Foord wrote:
>
>> Antoine Pitrou 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.
>>>
>>>
>>>
>> So we're stuck with inferior technology?
>>
>
> If you have the choice between breaking backwards compatibility
> and downloading other implementations from PyPI, I think backwards
> compatibility counts more.
>
> We've just had a major change in the stdlib for 3.x. Then the 3.0
> release was ditched due to poor performance. If we now start
> deprecating widely used modules in 3.2, we're going to lose
> a major pro argument for using Python: that of a stable eco system
> to write code for.
>
> I don't think we should deprecate any commonly used module (in the
> 3.x branch) unless there's a clear and documented migration path
> or -even better- a migration wrapper available for the deprecated
> module.
>
> The next major round of refactoring will have to wait for
> Python 4.x.
>
>
Language refactoring can wait for 4.0. Library improvements should be
ongoing.
As Brett says, even if we go down this road, optparse won't actually be
removed for several years.
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From solipsis at pitrou.net Thu Sep 10 23:44:00 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Thu, 10 Sep 2009 23:44:00 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<1252617299.5933.0.camel@localhost>
Message-ID: <1252619040.5933.19.camel@localhost>
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...
> 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?
(please note we have e.g. a lot of XML parsing libraries in the stdlib,
and nobody seems in a hurry to deprecate them)
From collinw at gmail.com Thu Sep 10 23:46:20 2009
From: collinw at gmail.com (Collin Winter)
Date: Thu, 10 Sep 2009 18:46:20 -0300
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA9715E.8080403@egenix.com>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
Message-ID: <43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
On Thu, Sep 10, 2009 at 6:36 PM, M.-A. Lemburg wrote:
> Michael Foord wrote:
>> So we're stuck with inferior technology?
>
> If you have the choice between breaking backwards compatibility
> and downloading other implementations from PyPI, I think backwards
> compatibility counts more.
Why doesn't this argument apply to getopt and optparse equally? Once
they've gone through the multi-year deprecation process and have been
finally removed, they can be put up on PyPI as stand-alone release to
support users who can't/won't migrate to argparse.
> We've just had a major change in the stdlib for 3.x. Then the 3.0
> release was ditched due to poor performance. If we now start
> deprecating widely used modules in 3.2, we're going to lose
> a major pro argument for using Python: that of a stable eco system
> to write code for.
The language can be stable, but if the entire 3.x series is just a
series of bugfixes on top of 3.0's stdlib, then that's a poor state of
affairs. That's the price users pay for shiny, new things: the old,
crufty things have to go away eventually, and I think it's unrealistic
to wait another 10 years for a hypothetical Py4k project to remove
getopt.
> I don't think we should deprecate any commonly used module (in the
> 3.x branch) unless there's a clear and documented migration path
> or -even better- a migration wrapper available for the deprecated
> module.
Agreed. There should be a documented cookbook for migrating from
getopt/optparse to argparse; I can't imagine that it's anyone's
intention to throw users in the deep end without any aid. Perhaps
simple cases could be handled automatically by a refactoring tool
based on 2to3 (in the same way that 3to2 is based on 2to3), which I
imagine many users would prefer.
Collin Winter
From brett at python.org Thu Sep 10 23:52:24 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 14:52:24 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252619040.5933.19.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
<1252619040.5933.19.camel@localhost>
Message-ID:
On Thu, Sep 10, 2009 at 14:44, 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...
>
>> 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?
Here is what the docs say for transitioning:
http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html#upgrading-optparse-code
. Also says why optparse was no longer being extended.
>
> (please note we have e.g. a lot of XML parsing libraries in the stdlib,
> and nobody seems in a hurry to deprecate them)
Because no one has brought forward an XML replacement module that
doesn't provide some huge reason to not use SAX, DOM, or ETree (and
there is a reason to have all three).
-Brett
From ubershmekel at gmail.com Thu Sep 10 23:58:53 2009
From: ubershmekel at gmail.com (Yuvgoog Greenle)
Date: Fri, 11 Sep 2009 00:58:53 +0300
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AA971F6.8060707@voidspace.org.uk>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<4AA971F6.8060707@voidspace.org.uk>
Message-ID: <9d153b7c0909101458l2254baf2jed9ff6e585b212e@mail.gmail.com>
+1 for deprecating optparse or at the very least building a timeline for
it's deprecation. Don't say no to progress, just say when.
I just wrote pyopt http://code.google.com/p/pyopt/ because I think exposing
functions to the command line is way too hard.
If Steven Bethard and the argparse community agree, I would really
appreciate a convenience method named "add_function" built into
the ArgumentParser. add_function would automagically read the docstring and
understand what are the arguments for a given function. I'm willing and
motivated to do the work for this. Annotations-type-casting could be awesome
as well, but I'm not greedy enough to ask.
--MrPyopt
On Fri, Sep 11, 2009 at 12:39 AM, Michael Foord wrote:
> M.-A. Lemburg wrote:
>
>> Michael Foord wrote:
>>
>>
>>> Antoine Pitrou 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.
>>>>
>>>>
>>>>
>>> So we're stuck with inferior technology?
>>>
>>>
>>
>> If you have the choice between breaking backwards compatibility
>> and downloading other implementations from PyPI, I think backwards
>> compatibility counts more.
>>
>> We've just had a major change in the stdlib for 3.x. Then the 3.0
>> release was ditched due to poor performance. If we now start
>> deprecating widely used modules in 3.2, we're going to lose
>> a major pro argument for using Python: that of a stable eco system
>> to write code for.
>>
>> I don't think we should deprecate any commonly used module (in the
>> 3.x branch) unless there's a clear and documented migration path
>> or -even better- a migration wrapper available for the deprecated
>> module.
>>
>> The next major round of refactoring will have to wait for
>> Python 4.x.
>>
>>
>>
> Language refactoring can wait for 4.0. Library improvements should be
> ongoing.
>
> As Brett says, even if we go down this road, optparse won't actually be
> removed for several years.
>
> Michael
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
>
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
Yuv
http://code.google.com/p/pyopt/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brett at python.org Fri Sep 11 00:04:56 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 15:04:56 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <9d153b7c0909101458l2254baf2jed9ff6e585b212e@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost> <4AA96E01.2020601@voidspace.org.uk>
<4AA9715E.8080403@egenix.com> <4AA971F6.8060707@voidspace.org.uk>
<9d153b7c0909101458l2254baf2jed9ff6e585b212e@mail.gmail.com>
Message-ID:
On Thu, Sep 10, 2009 at 14:58, Yuvgoog Greenle wrote:
> +1 for deprecating optparse or at the very least building a timeline for
> it's deprecation. Don't say no to progress, just say when.
> I just wrote pyopt?http://code.google.com/p/pyopt/?because I think exposing
> functions to the command line is way too hard.
> If?Steven Bethard and the argparse community agree, I?would really
> appreciate a convenience method named?"add_function"?built into
> the?ArgumentParser. add_function would automagically read the docstring and
> understand what are the arguments for a given function. I'm willing and
> motivated to do the work for this. Annotations-type-casting could be awesome
> as well, but I'm not greedy enough to ask.
If this moves forward there will be a PEP and you can bring this idea up then.
-Brett
> --MrPyopt
>
> On Fri, Sep 11, 2009 at 12:39 AM, Michael Foord
> wrote:
>>
>> M.-A. Lemburg wrote:
>>>
>>> Michael Foord wrote:
>>>
>>>>
>>>> Antoine Pitrou 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.
>>>>>
>>>>>
>>>>
>>>> So we're stuck with inferior technology?
>>>>
>>>
>>> If you have the choice between breaking backwards compatibility
>>> and downloading other implementations from PyPI, I think backwards
>>> compatibility counts more.
>>>
>>> We've just had a major change in the stdlib for 3.x. Then the 3.0
>>> release was ditched due to poor performance. If we now start
>>> deprecating widely used modules in 3.2, we're going to lose
>>> a major pro argument for using Python: that of a stable eco system
>>> to write code for.
>>>
>>> I don't think we should deprecate any commonly used module (in the
>>> 3.x branch) unless there's a clear and documented migration path
>>> or -even better- a migration wrapper available for the deprecated
>>> module.
>>>
>>> The next major round of refactoring will have to wait for
>>> Python 4.x.
>>>
>>>
>>
>> Language refactoring can wait for 4.0. Library improvements should be
>> ongoing.
>>
>> As Brett says, even if we go down this road, optparse won't actually be
>> removed for several years.
>>
>> Michael
>>
>> --
>> http://www.ironpythoninaction.com/
>> http://www.voidspace.org.uk/blog
>>
>>
>> _______________________________________________
>> stdlib-sig mailing list
>> stdlib-sig at python.org
>> http://mail.python.org/mailman/listinfo/stdlib-sig
>
>
>
> --
> Yuv
> http://code.google.com/p/pyopt/
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
>
From holger at merlinux.eu Fri Sep 11 00:07:37 2009
From: holger at merlinux.eu (holger krekel)
Date: Fri, 11 Sep 2009 00:07:37 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost>
<43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
Message-ID: <20090910220737.GC15455@trillke.net>
On Thu, Sep 10, 2009 at 18:31 -0300, Collin Winter wrote:
> On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou 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?
holger
From solipsis at pitrou.net Fri Sep 11 00:04:32 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Fri, 11 Sep 2009 00:04:32 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost> <4AA96E01.2020601@voidspace.org.uk>
<4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
Message-ID: <1252620272.5933.38.camel@localhost>
> Why doesn't this argument apply to getopt and optparse equally?
Because optparse has been, for years, the de facto standard API for
parsing command-line arguments. It is reasonably Pythonic and flexible,
if perhaps not as sleek and concise as other alternatives.
getopt is much lower-level, archaic, and probably only appeals to people
who are used to the C version of it.
> The language can be stable, but if the entire 3.x series is just a
> series of bugfixes on top of 3.0's stdlib, then that's a poor state of
> affairs.
This is a false dilemma. There is nothing wrong with introducing new
things. Deprecation of old things, however, should be done carefully,
and with two things in mind:
- the interest of users
- our interest as Python developers and maintainers
It seems to me that optparse has been needing little maintenance, so at
least the second reason doesn't apply here. As for the first reason,
since optparse isn't inherently insecure, fragile, platform-specific, or
wildly under-performing, I don't see it being applicable either.
The main reason, as I understand, is to make the big picture clearer for
new users because there's only one advertised way to do it. While it is
very nice for a clean sheet approach, it certainly isn't a consolation
for people who will have to rewrite their recently broken code...
From barry at python.org Fri Sep 11 00:11:21 2009
From: barry at python.org (Barry Warsaw)
Date: Thu, 10 Sep 2009 18:11:21 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252619040.5933.19.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
<1252619040.5933.19.camel@localhost>
Message-ID: <1DDCB937-D5E1-4325-80B4-1957340BF714@python.org>
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:
From ubershmekel at gmail.com Fri Sep 11 00:11:35 2009
From: ubershmekel at gmail.com (Yuvgoog Greenle)
Date: Fri, 11 Sep 2009 01:11:35 +0300
Subject: [stdlib-sig] Pyopt - command-line options that are alot easier
than optparse
In-Reply-To: <20090910100300.GQ15455@trillke.net>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
<20090910100300.GQ15455@trillke.net>
Message-ID: <9d153b7c0909101511i2f6e76dfod55e276c8adb0aa4@mail.gmail.com>
>
>
> @cmdline
> def main(archer=str, boulder=float, magic=42):
>
> which would wrap a parser around the function
> and otherwise work like your example. This can
> easily work down to Python2.3.
>
> cheers,
> holger
>
That is a really clever idea, it took me a while just to understand how it'd
work. If it weren't so hacky-lookin I would indeed consider it. I mean, any
pythonista would look and say "dude, you've got a bug, that doesn't make
sense". Either way, I'm gonna add pyopt to PyPI
--
Yuv
http://code.google.com/p/pyopt/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brett at python.org Fri Sep 11 00:16:08 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 15:16:08 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <20090910220737.GC15455@trillke.net>
References:
<1252617299.5933.0.camel@localhost>
<43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
<20090910220737.GC15455@trillke.net>
Message-ID:
On Thu, Sep 10, 2009 at 15:07, holger krekel wrote:
> On Thu, Sep 10, 2009 at 18:31 -0300, Collin Winter wrote:
>> On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou 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
From michael at voidspace.org.uk Fri Sep 11 00:17:54 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Thu, 10 Sep 2009 23:17:54 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <20090910220737.GC15455@trillke.net>
References: <1252617299.5933.0.camel@localhost> <43aa6ff70909101431g69d12ac4q6106621f6ce8e6a5@mail.gmail.com>
<20090910220737.GC15455@trillke.net>
Message-ID: <4AA97B12.9010302@voidspace.org.uk>
holger krekel wrote:
> On Thu, Sep 10, 2009 at 18:31 -0300, Collin Winter wrote:
>
>> On Thu, Sep 10, 2009 at 6:14 PM, Antoine Pitrou 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?
>
argparse works with current versions of Python, it will just no longer
be an additional dependency on recent versions once we include it.
If you are determined to stick with optparse it becomes an external
dependency if you are using a version of Python that doesn't include it.
Michael
> holger
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From barry at python.org Fri Sep 11 00:18:28 2009
From: barry at python.org (Barry Warsaw)
Date: Thu, 10 Sep 2009 18:18:28 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252620272.5933.38.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
Message-ID:
On Sep 10, 2009, at 6:04 PM, Antoine Pitrou wrote:
> The main reason, as I understand, is to make the big picture clearer
> for
> new users because there's only one advertised way to do it. While it
> is
> very nice for a clean sheet approach, it certainly isn't a consolation
> for people who will have to rewrite their recently broken code...
Perhaps this indicates a solution then. Let's leave getopt and
optparse in the stdlib as long as they aren't totally bitrotted into
non-functionality, or as long as there is someone willing to maintain
them as the language evolves. But let's effectively deprecate them by
moving their documentation to the backwaters so the average Python
programmer will not find them, but will find argparse instead. Once
argparse is in the stdlib, all new code should use be using it
exclusively.
Remember there's more new code that hasn't been written yet than old
code needing to be maintained :).
-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:
From brett at python.org Fri Sep 11 00:35:25 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 15:35:25 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<1252617299.5933.0.camel@localhost> <4AA96E01.2020601@voidspace.org.uk>
<4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
Message-ID:
On Thu, Sep 10, 2009 at 15:18, Barry Warsaw wrote:
> On Sep 10, 2009, at 6:04 PM, Antoine Pitrou wrote:
>
>> The main reason, as I understand, is to make the big picture clearer for
>> new users because there's only one advertised way to do it. While it is
>> very nice for a clean sheet approach, it certainly isn't a consolation
>> for people who will have to rewrite their recently broken code...
>
> Perhaps this indicates a solution then. ?Let's leave getopt and optparse in
> the stdlib as long as they aren't totally bitrotted into non-functionality,
> or as long as there is someone willing to maintain them as the language
> evolves. ?But let's effectively deprecate them by moving their documentation
> to the backwaters so the average Python programmer will not find them, but
> will find argparse instead. ?Once argparse is in the stdlib, all new code
> should use be using it exclusively.
>
As long as they always raise a deprecation warning and it is clear
they are no longer maintained then fine. Modules could be in stages
of:
1. pending deprecation
2. deprecation
3. perpetual, unmaintained bitrot (w/ docs removed; deprecation can
point to last version w/ docs)
4. deletion when we think no one is using it anymore (maybe next major
revision of Python)
And this should only apply to pure Python code as I don't want build
dependency issues lying around forever. If we can make sure that the
Cheeseshop gets its version updated after every micro release while it
is in stage 1 or 2 this could actually work.
-Brett
From jbaker at zyasoft.com Fri Sep 11 00:40:17 2009
From: jbaker at zyasoft.com (Jim Baker)
Date: Thu, 10 Sep 2009 16:40:17 -0600
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
Message-ID:
+1 - I don't want Python being like Java where the only deprecation that
occurs is when code is actively harmful - and it still won't be removed for
backwards compatibility's sake.
On Thu, Sep 10, 2009 at 4:35 PM, Brett Cannon wrote:
> On Thu, Sep 10, 2009 at 15:18, Barry Warsaw wrote:
> > On Sep 10, 2009, at 6:04 PM, Antoine Pitrou wrote:
> >
> >> The main reason, as I understand, is to make the big picture clearer for
> >> new users because there's only one advertised way to do it. While it is
> >> very nice for a clean sheet approach, it certainly isn't a consolation
> >> for people who will have to rewrite their recently broken code...
> >
> > Perhaps this indicates a solution then. Let's leave getopt and optparse
> in
> > the stdlib as long as they aren't totally bitrotted into
> non-functionality,
> > or as long as there is someone willing to maintain them as the language
> > evolves. But let's effectively deprecate them by moving their
> documentation
> > to the backwaters so the average Python programmer will not find them,
> but
> > will find argparse instead. Once argparse is in the stdlib, all new code
> > should use be using it exclusively.
> >
>
> As long as they always raise a deprecation warning and it is clear
> they are no longer maintained then fine. Modules could be in stages
> of:
>
> 1. pending deprecation
> 2. deprecation
> 3. perpetual, unmaintained bitrot (w/ docs removed; deprecation can
> point to last version w/ docs)
> 4. deletion when we think no one is using it anymore (maybe next major
> revision of Python)
>
> And this should only apply to pure Python code as I don't want build
> dependency issues lying around forever. If we can make sure that the
> Cheeseshop gets its version updated after every micro release while it
> is in stage 1 or 2 this could actually work.
>
> -Brett
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
Jim Baker
jbaker at zyasoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From brett at python.org Fri Sep 11 00:47:52 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 15:47:52 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<1252617299.5933.0.camel@localhost> <4AA96E01.2020601@voidspace.org.uk>
<4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
Message-ID:
On Thu, Sep 10, 2009 at 15:40, Jim Baker wrote:
> +1 - I don't want Python being like Java where the only deprecation that
> occurs is when code is actively harmful - and it still won't be removed for
> backwards compatibility's sake.
The deprecation would be permanent, so it won't be like Java where we
support stuff only until we consider it harmful. And unlike Java we
would not keep the docs around forever, suggesting that you can just
simply ignore what the docs say. The modules would eventually
disappear from people's knowledge.
This idea is not far off from what we already do. There were a bunch
of deprecated modules in the standard library I ripped out for Python
3 that had been slated for removal for ages. It's just nobody bothered
to remove them.
> On Thu, Sep 10, 2009 at 4:35 PM, Brett Cannon wrote:
>>
>> On Thu, Sep 10, 2009 at 15:18, Barry Warsaw wrote:
>> > On Sep 10, 2009, at 6:04 PM, Antoine Pitrou wrote:
>> >
>> >> The main reason, as I understand, is to make the big picture clearer
>> >> for
>> >> new users because there's only one advertised way to do it. While it is
>> >> very nice for a clean sheet approach, it certainly isn't a consolation
>> >> for people who will have to rewrite their recently broken code...
>> >
>> > Perhaps this indicates a solution then. ?Let's leave getopt and optparse
>> > in
>> > the stdlib as long as they aren't totally bitrotted into
>> > non-functionality,
>> > or as long as there is someone willing to maintain them as the language
>> > evolves. ?But let's effectively deprecate them by moving their
>> > documentation
>> > to the backwaters so the average Python programmer will not find them,
>> > but
>> > will find argparse instead. ?Once argparse is in the stdlib, all new
>> > code
>> > should use be using it exclusively.
>> >
>>
>> As long as they always raise a deprecation warning and it is clear
>> they are no longer maintained then fine. Modules could be in stages
>> of:
>>
>> 1. pending deprecation
>> 2. deprecation
>> 3. perpetual, unmaintained bitrot (w/ docs removed; deprecation can
>> point to last version w/ docs)
>> 4. deletion when we think no one is using it anymore (maybe next major
>> revision of Python)
>>
>> And this should only apply to pure Python code as I don't want build
>> dependency issues lying around forever. If we can make sure that the
>> Cheeseshop gets its version updated after every micro release while it
>> is in stage 1 or 2 this could actually work.
>>
>> -Brett
>> _______________________________________________
>> stdlib-sig mailing list
>> stdlib-sig at python.org
>> http://mail.python.org/mailman/listinfo/stdlib-sig
>
>
>
> --
> Jim Baker
> jbaker at zyasoft.com
>
From dgou at mac.com Thu Sep 10 23:49:51 2009
From: dgou at mac.com (Douglas Philips)
Date: Thu, 10 Sep 2009 17:49:51 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1252619040.5933.19.camel@localhost>
References:
<1252617299.5933.0.camel@localhost>
<1252619040.5933.19.camel@localhost>
Message-ID: <3A92C1F2-F57B-4F1C-8EE9-5CC9490D1355@mac.com>
On or about 2009 Sep 10, at 5:44 PM, Antoine Pitrou indited:
> 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.
If they don't even upgrade their Python environment, they can't
possibly be affected by this.
In large corp. environments, moving from 2.4.4 to 2.5 or 2.6 is all
based on "what NEW stuff can we leverage." Once the libraries are
dead, there is no reason to change versions at all, it is just too
many installations to bother with.
> (please note we have e.g. a lot of XML parsing libraries in the
> stdlib,
> and nobody seems in a hurry to deprecate them)
If we can't even get traction on something virtually trivial like
argparse, what's the point.
-Doug
From collinw at gmail.com Fri Sep 11 00:55:42 2009
From: collinw at gmail.com (Collin Winter)
Date: Thu, 10 Sep 2009 19:55:42 -0300
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
Message-ID: <43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
On Thu, Sep 10, 2009 at 7:47 PM, Brett Cannon wrote:
> On Thu, Sep 10, 2009 at 15:40, Jim Baker wrote:
>> +1 - I don't want Python being like Java where the only deprecation that
>> occurs is when code is actively harmful - and it still won't be removed for
>> backwards compatibility's sake.
>
> The deprecation would be permanent, so it won't be like Java where we
> support stuff only until we consider it harmful. And unlike Java we
> would not keep the docs around forever, suggesting that you can just
> simply ignore what the docs say. The modules would eventually
> disappear from people's knowledge.
If we allow the code to survive, eventually someone will need to
maintain an application that uses the deprecated, now-docless module.
If I were that person, I would curse the names of whoever left the
code there but removed the docs and allowed bugs to creep in (if the
module disappears from people's knowledge, it will likely disappear
from our consciousness).
Honest question, having only read the docs about argparse: would it be
possible to merge the functionality of argparse into optparse and so
preserve a greater measure of backwards compatibility? Some of the
stuff I'm reading about in
http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
looks like it should be able to be integrated fairly easily into the
existing optparse structure.
Collin Winter
From brett at python.org Fri Sep 11 01:06:52 2009
From: brett at python.org (Brett Cannon)
Date: Thu, 10 Sep 2009 16:06:52 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
References:
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
<43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
Message-ID:
On Thu, Sep 10, 2009 at 15:55, Collin Winter wrote:
> On Thu, Sep 10, 2009 at 7:47 PM, Brett Cannon wrote:
>> On Thu, Sep 10, 2009 at 15:40, Jim Baker wrote:
>>> +1 - I don't want Python being like Java where the only deprecation that
>>> occurs is when code is actively harmful - and it still won't be removed for
>>> backwards compatibility's sake.
>>
>> The deprecation would be permanent, so it won't be like Java where we
>> support stuff only until we consider it harmful. And unlike Java we
>> would not keep the docs around forever, suggesting that you can just
>> simply ignore what the docs say. The modules would eventually
>> disappear from people's knowledge.
>
> If we allow the code to survive, eventually someone will need to
> maintain an application that uses the deprecated, now-docless module.
> If I were that person, I would curse the names of whoever left the
> code there but removed the docs and allowed bugs to creep in (if the
> module disappears from people's knowledge, it will likely disappear
> from our consciousness).
>
The docs would live on w/ the Python release that last contained it.
Plus the Cheeseshop release would have a copy of the docs.
I think PEP 4 (http://www.python.org/dev/peps/pep-0004/) needs to be
tightened up to flat-out explain what a deprecation means and how long
the code and docs will survive at minimum.
> Honest question, having only read the docs about argparse: would it be
> possible to merge the functionality of argparse into optparse and so
> preserve a greater measure of backwards compatibility? Some of the
> stuff I'm reading about in
> http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
> looks like it should be able to be integrated fairly easily into the
> existing optparse structure.
Don't know. Would have to ask Steven about that. I wanted to first see
if people liked the idea of argparse enough.
-Brett
From jnoller at gmail.com Fri Sep 11 03:45:59 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Thu, 10 Sep 2009 21:45:59 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <4222a8490909101845k4aca8d8bl793a5f8da52ade86@mail.gmail.com>
On Thu, Sep 10, 2009 at 2:56 PM, Brett Cannon 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), out of the standard library
> and toss them into PyPI for those who refuse to switch. The standard
> library might not evolve a lot, but it isn't dead or in stone.
>
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
>
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
>
> I am +0
+1 to deprecation; +1 for inclusion.
jesse
From lac at openend.se Fri Sep 11 06:37:21 2009
From: lac at openend.se (Laura Creighton)
Date: Fri, 11 Sep 2009 06:37:21 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: Message from Barry Warsaw of "Thu,
10 Sep 2009 18:11:21 EDT."
<1DDCB937-D5E1-4325-80B4-1957340BF714@python.org>
References:
<1252617299.5933.0.camel@localhost>
<1252619040.5933.19.camel@localhost>
<1DDCB937-D5E1-4325-80B4-1957340BF714@python.org>
Message-ID: <200909110437.n8B4bMdE024567@theraft.openend.se>
In a message of Thu, 10 Sep 2009 18:11:21 EDT, Barry Warsaw writes:
>Then we have a serious long term problem. Taken to its logical =20
>conclusion, we're going to end up with a batteries included standard =20
>library with nothing but old, /effectively/ obsolete APIs with all the =2
>0=
>
>good new stuff that people want in the Cheeseshop. Okay, in reality =20
>it will always be a mix, but I do think this policy means that the =20
>APIs in the stdlib will degrade and ultimately decay over time.
>
>If that's the case, why even have a stdlib?
That is, actually, pretty much what I want a stdlib for. I don't want
it to contain the newest, greatest, and best ways of doing things. I
want it to contain the things that people are willing to maintain until
hell freezes over, which will largely be things that aren't ever going
to change until hell freezes over.
I want users to know that if they want the latest, greatest, and best
ways of doing things -- the way we recommend people do things now --
then they should not be assuming that the standard library has it.
The point of using things in the standard library is so that you
will have a reason to believe that if you write your code using
this stuff, then you don't have to worry (much, at any rate, there
is always Python 3.0) about having to change your code at some later
date because the standard library now has a new way of doing things
which some people like a lot better than the old way you used.
Right now there are a whole lot of users of python programs who have
no programming skills whatsoever. Waking up one morning and discovering
that their computing environment has gone to hell because the default
Python is now 3.7 and now the option parsing in their programs don't
work any more -- and they will have to get a replacement from the
original author of the tool, or some other programmer seems a remarkably
uncivil way to treat your users.
If new python programmers cannot be trusted to read the standard library
manual and understand what a paragraph that says:
XXX is included in the standard library for reasons of
backwards compatibility. We strongly recommend that you use YYY
instead.
then they are too clueless to worry about. But if, having read this,
they choose to use XXX anyway, as today many people use getopt instead
optparse, when they are writing python programs that will
only be deployed on windows and who want the /option syntax that optparse
denies them, well then, that's their choice too.
I don't know anything about argparse, but reading the docs leads me to
believe it is a big improvement on optparse, which I dislike. But
Simon Willison's optfunc http://simonwillison.net/2009/May/28/optfunc/
looks interesting to me as well, as would a parser that took its information
from docstrings.
There are two foolish attitudes here. The first is that being tidy, or
impossible for newbies to misunderstand, because we won't give them the
option of using the wrong stuff is a higher value than not breaking
perfectly good working code. It's better to teach the newbies that
there are lots of options out there than to hide this fact from them.
The second foolish attitude is that nobody seems to be discussing
'do we like argparse enough to be willing to maintain it for the
indefinite future as part of the standard library'. Because, to my
mind, that is the real question. If we no longer care about that,
and things in the standard library can be removed 'whenever we have
a replacement that we like better', then the standard library is no
longer really a _standard_ library, but rather a _stuff we suggest
you use_ library. And do we really want one of those?
I sure don't.
Laura
>-Barry
From lac at openend.se Fri Sep 11 06:48:21 2009
From: lac at openend.se (Laura Creighton)
Date: Fri, 11 Sep 2009 06:48:21 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: Message from Collin Winter of "Thu,
10 Sep 2009 19:55:42 -0300."
<43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
<43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
Message-ID: <200909110448.n8B4mL5H025784@theraft.openend.se>
In a message of Thu, 10 Sep 2009 19:55:42 -0300, Collin Winter writes:
>Honest question, having only read the docs about argparse: would it be
>possible to merge the functionality of argparse into optparse and so
>preserve a greater measure of backwards compatibility? Some of the
>stuff I'm reading about in
>http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
>looks like it should be able to be integrated fairly easily into the
>existing optparse structure.
>
>Collin Winter
Having looked at the code for optparse, I would say, no, hacking the
optparse enhancements into optparse would be extremely difficult. optparse
was designed by somebody who finds certain common patterns of option
parsing (required options, parsing options passed as /whatever) such
a terrible idea that preventing people from doing these things, even
if they -really-, -really-, wanted to was a significant design goal.
Laura
From holger at merlinux.eu Fri Sep 11 08:30:38 2009
From: holger at merlinux.eu (holger krekel)
Date: Fri, 11 Sep 2009 08:30:38 +0200
Subject: [stdlib-sig] Pyopt - command-line options that are alot
easier than optparse
In-Reply-To: <9d153b7c0909101511i2f6e76dfod55e276c8adb0aa4@mail.gmail.com>
References: <9d153b7c0909091738w6b05d1aeq9e70d58300a2daee@mail.gmail.com>
<20090910100300.GQ15455@trillke.net>
<9d153b7c0909101511i2f6e76dfod55e276c8adb0aa4@mail.gmail.com>
Message-ID: <20090911063038.GD15455@trillke.net>
On Fri, Sep 11, 2009 at 01:11 +0300, Yuvgoog Greenle wrote:
> > @cmdline
> > def main(archer=str, boulder=float, magic=42):
> >
> > which would wrap a parser around the function
> > and otherwise work like your example. This can
> > easily work down to Python2.3.
> >
> > cheers,
> > holger
> >
>
> That is a really clever idea, it took me a while just to understand how it'd
> work. If it weren't so hacky-lookin I would indeed consider it. I mean, any
> pythonista would look and say "dude, you've got a bug, that doesn't make
> sense".
hehe, sure. one of the reasons it didn't go public.
> Either way, I'm gonna add pyopt to PyPI
cheers,
holger
> --
> Yuv
> http://code.google.com/p/pyopt/
--
Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu
From steven.bethard at gmail.com Fri Sep 11 09:24:54 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Fri, 11 Sep 2009 00:24:54 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <9d153b7c0909101458l2254baf2jed9ff6e585b212e@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<4AA971F6.8060707@voidspace.org.uk>
<9d153b7c0909101458l2254baf2jed9ff6e585b212e@mail.gmail.com>
Message-ID:
On Thu, Sep 10, 2009 at 2:58 PM, Yuvgoog Greenle wrote:
> I just wrote pyopt?http://code.google.com/p/pyopt/?because I think exposing
> functions to the command line is way too hard.
> If?Steven Bethard and the argparse community agree, I?would really
> appreciate a convenience method named?"add_function"?built into
> the?ArgumentParser. add_function would automagically read the docstring and
> understand what are the arguments for a given function. I'm willing and
> motivated to do the work for this. Annotations-type-casting could be awesome
> as well, but I'm not greedy enough to ask.
Regardless of what happens for argparse in the standard library, if
you're willing to provide a patch to add this to argparse, I'd be
happy to review it and include it in argparse.
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From steven.bethard at gmail.com Fri Sep 11 09:38:25 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Fri, 11 Sep 2009 00:38:25 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
References:
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
<43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
Message-ID:
On Thu, Sep 10, 2009 at 3:55 PM, Collin Winter wrote:
> Honest question, having only read the docs about argparse: would it be
> possible to merge the functionality of argparse into optparse and so
> preserve a greater measure of backwards compatibility? Some of the
> stuff I'm reading about in
> http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
> looks like it should be able to be integrated fairly easily into the
> existing optparse structure.
I tried this, and when I originally started argparse, it was my intent
to make it fully compatible with optparse. For a simple example,
consider the documented "parser.largs", "parser.rargs" and
"parser.values" attributes of OptionParser. Supporting these would not
allow argparse's current parsing strategy, which doesn't follow the
optparse approach of moving args from "largs" to "rargs".
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From steven.bethard at gmail.com Fri Sep 11 09:52:30 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Fri, 11 Sep 2009 00:52:30 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID:
On Thu, Sep 10, 2009 at 11:56 AM, Brett Cannon wrote:
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
Just in case it wasn't already clear, I'm happy to write a PEP for
argparse if we come to some consensus on (1) whether or not it should
be included and (2) whether or not it should be accompanied by a
deprecation process for getopt and optparse.
FWIW, I currently sit in the camp of adding big glaring "this module
is deprecated" notes in the documentation for getopt and optparse, and
sticking PendingDeprecation warnings into them. PendingDeprecation
warnings are off by default so shouldn't cause problems for the vast
majority of current users of these modules. We can switch those
PendingDeprecation warnings to Deprecation warnings when, say, we see
more hits for argparse than for optparse on Google code search. Right
now, I see optparse at around 23,000 [1] and argparse at only around
400, so I imagine that would be at least a few years.
Steve
[1]http://www.google.com/codesearch?q=optparse++lang:python&ct=rr&cs_r=lang:python
[2]http://www.google.com/codesearch?q=argparse++lang:python&ct=rr&cs_r=lang:python
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From steven.bethard at gmail.com Fri Sep 11 09:54:53 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Fri, 11 Sep 2009 00:54:53 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID:
On Fri, Sep 11, 2009 at 12:52 AM, Steven Bethard
wrote:
> FWIW, I currently sit in the camp of adding big glaring "this module
> is deprecated" notes in the documentation for getopt and optparse, and
> sticking PendingDeprecation warnings into them. PendingDeprecation
> warnings are off by default so shouldn't cause problems for the vast
> majority of current users of these modules. We can switch those
> PendingDeprecation warnings to Deprecation warnings when, say, we see
> more hits for argparse than for optparse on Google code search. Right
> now, I see optparse at around 23,000 [1] and argparse at only around
> 400, so I imagine that would be at least a few years.
(And many of those 400 aren't even for the argparse package itself,
just other classes and methods with the same name.)
Steve
> [1]http://www.google.com/codesearch?q=optparse++lang:python&ct=rr&cs_r=lang:python
> [2]http://www.google.com/codesearch?q=argparse++lang:python&ct=rr&cs_r=lang:python
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From mal at egenix.com Fri Sep 11 11:27:03 2009
From: mal at egenix.com (M.-A. Lemburg)
Date: Fri, 11 Sep 2009 11:27:03 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com> <43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
Message-ID: <4AAA17E7.7050509@egenix.com>
Brett Cannon wrote:
> On Thu, Sep 10, 2009 at 15:40, Jim Baker wrote:
>> +1 - I don't want Python being like Java where the only deprecation that
>> occurs is when code is actively harmful - and it still won't be removed for
>> backwards compatibility's sake.
>
> The deprecation would be permanent, so it won't be like Java where we
> support stuff only until we consider it harmful. And unlike Java we
> would not keep the docs around forever, suggesting that you can just
> simply ignore what the docs say. The modules would eventually
> disappear from people's knowledge.
>
> This idea is not far off from what we already do. There were a bunch
> of deprecated modules in the standard library I ripped out for Python
> 3 that had been slated for removal for ages. It's just nobody bothered
> to remove them.
Right and this was done when transitioning from 2.x to 3.x - which
is fine. Backwards compatibility can be broken in such major release
steps.
However, it should be noted that the deprecated modules were mostly
targeting obsolete architectures, their functionality was moved
to other modules, or they were so obscure that the number of people
using them warranted deprecating and then finally removing them.
None of the above applies to the getopt and optparse modules.
getopt mimics the C level function of the same name and provides
an easy entry for C programmers. It has this approach in common
with many other Python modules and exposed APIs.
optparse has a more Python-friendly approach to option parsing.
Both serve their needs and both are in common use.
Note that the purpose of the stdlib is to provide tools to be
able to get things working without having to rely on 3rd party
tools.
The main motivation behind the stdlib is stability and soundness,
much more than providing the latest and greatest gimmicks you can
possibly imagine. It provides the basic set of tools (and does
an very good job at this).
Users are free to use other modules or libraries, if they believe
that a certain API or way of doing things suits them better.
Just because one group of people thinks that the shiny brand
new method B suits them better, doesn't mean that it's OK to
put the extra burden of porting applications using method A
to method B on the happy users of method A.
Even less so, since nothing stops people from using method B
by downloading and installing their favorite tool from PyPI.
And another aspect to consider: instead of replacing existing
tools with new ones, it's often better to think a little harder
and add the missing functionality to the existing tools.
That approach buys you more features and more stability at
much lower maintenance costs.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 11 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
From p.f.moore at gmail.com Fri Sep 11 12:51:49 2009
From: p.f.moore at gmail.com (Paul Moore)
Date: Fri, 11 Sep 2009 11:51:49 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <200909110437.n8B4bMdE024567@theraft.openend.se>
References:
<1252617299.5933.0.camel@localhost>
<1252619040.5933.19.camel@localhost>
<1DDCB937-D5E1-4325-80B4-1957340BF714@python.org>
<200909110437.n8B4bMdE024567@theraft.openend.se>
Message-ID: <79990c6b0909110351l257902bawaac76a1582cda08a@mail.gmail.com>
2009/9/11 Laura Creighton :
> That is, actually, pretty much what I want a stdlib for. ?I don't want
> it to contain the newest, greatest, and best ways of doing things. ?I
> want it to contain the things that people are willing to maintain until
> hell freezes over, which will largely be things that aren't ever going
> to change until hell freezes over.
Hmm, interesting. What *I* want from the stdlib is a readily-available
library of best practice (or at least, sufficiently good and
production-quality) tools covering a wide range of common programming
tasks. In other words, unless I'm doing something specialised, I want
to be able to write code without external dependencies.
Simple examples:
- random uses Mersenne Twister, which is a suitable choice for "most
people". I don't want something like C's rand() (which isn't strong
enough - or wasn't last time I used it...) or Haskell's System.Random
(which provides stronger guarantees which aren't relevant to normal
use, at a performance cost).
- hashlib provides current best practice hash algorithms, implemented
efficiently. I wouldn't want to only have md5 in the stdlib.
- http.server (SimpleHTTPServer) may not be as good as Twisted, but
it's good enough for a simple web interface.
So, while I don't necessarily want "newest, greatest and best", I do
expect "up to date, production quality, and current good practice". If
I wanted unchanging, I wouldn't upgrade my Python installation.
Paul.
From solipsis at pitrou.net Fri Sep 11 13:03:52 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Fri, 11 Sep 2009 13:03:52 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <79990c6b0909110351l257902bawaac76a1582cda08a@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost>
<1252619040.5933.19.camel@localhost>
<1DDCB937-D5E1-4325-80B4-1957340BF714@python.org>
<200909110437.n8B4bMdE024567@theraft.openend.se>
<79990c6b0909110351l257902bawaac76a1582cda08a@mail.gmail.com>
Message-ID: <1252667032.5620.3.camel@localhost>
Le vendredi 11 septembre 2009 ? 11:51 +0100, Paul Moore a ?crit :
> So, while I don't necessarily want "newest, greatest and best", I do
> expect "up to date, production quality, and current good practice".
Well, optparse *is* production quality and rather good practice.
It may not be the best API out there but it's certainly robust,
functional, and doesn't have any glaring flaws (like security or
performance problems).
> If
> I wanted unchanging, I wouldn't upgrade my Python installation.
There are lots of reasons for upgrading a Python installation, some of
which having to do with upgrading your whole system (especially if
you're under Linux), some of which having to do that older versions
ultimately don't get supported anymore, even for security fixes.
Anyway, I think Barry finally hit the nail on the head: if we include
something "better" than optparse, then we simply have to deemphasize
optparse in the documentation and emphasize its new replacement, so that
people know what to use for new programs.
From lac at openend.se Fri Sep 11 14:29:25 2009
From: lac at openend.se (Laura Creighton)
Date: Fri, 11 Sep 2009 14:29:25 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: Message from Laura Creighton of "Fri,
11 Sep 2009 06:48:21 +0200."
<200909110448.n8B4mL5H025784@theraft.openend.se>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk> <4AA9715E.8080403@egenix.com>
<43aa6ff70909101446g646dd43dia1c601e591b6c39b@mail.gmail.com>
<1252620272.5933.38.camel@localhost>
<43aa6ff70909101555m64532c04ib63121d686761fe3@mail.gmail.com>
<200909110448.n8B4mL5H025784@theraft.openend.se>
Message-ID: <200909111229.n8BCTPwl026848@theraft.openend.se>
In a message of Fri, 11 Sep 2009 06:48:21 +0200, Laura Creighton writes:
>In a message of Thu, 10 Sep 2009 19:55:42 -0300, Collin Winter writes:
>>Honest question, having only read the docs about argparse: would it be
>>possible to merge the functionality of argparse into optparse and so
>>preserve a greater measure of backwards compatibility? Some of the
>>stuff I'm reading about in
>>http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html
>>looks like it should be able to be integrated fairly easily into the
>>existing optparse structure.
>>
>>Collin Winter
>
>Having looked at the code for optparse, I would say, no, hacking the
>optparse enhancements into optparse would be extremely difficult. optpar
>se
>was designed by somebody who finds certain common patterns of option
>parsing (required options, parsing options passed as /whatever) such
>a terrible idea that preventing people from doing these things, even
>if they -really-, -really-, wanted to was a significant design goal.
>
>Laura
Ooops, I see now that I misread your question, as 'can we stick the
new argparse things into optparse' rather than the other way around.
Sorry about that.
Laura
From ronaldoussoren at mac.com Sun Sep 13 09:31:03 2009
From: ronaldoussoren at mac.com (Ronald Oussoren)
Date: Sun, 13 Sep 2009 09:31:03 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <1afaf6160909101425p14970423o3b202bd7207a16db@mail.gmail.com>
References:
<1252617299.5933.0.camel@localhost> <4AA96E01.2020601@voidspace.org.uk>
<1afaf6160909101425p14970423o3b202bd7207a16db@mail.gmail.com>
Message-ID: <2B5285AC-88EA-49B6-AAE3-ED305A806764@mac.com>
On 10 Sep, 2009, at 23:25, Benjamin Peterson wrote:
> 2009/9/10 Michael Foord :
>> Antoine Pitrou 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.
>>>
>>>
>>
>> So we're stuck with inferior technology?
>
> No, that's never been the case. Download and install argparse.
optparse's source code isn't cast in stone, therefore its interface
can evolve.
I'm -0 on deprecating getopt, -1 on deprecating optparse and -0 on
adding argparse as is.
Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2224 bytes
Desc: not available
URL:
From steven.bethard at gmail.com Sun Sep 13 19:52:23 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Sun, 13 Sep 2009 10:52:23 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <2B5285AC-88EA-49B6-AAE3-ED305A806764@mac.com>
References:
<1252617299.5933.0.camel@localhost>
<4AA96E01.2020601@voidspace.org.uk>
<1afaf6160909101425p14970423o3b202bd7207a16db@mail.gmail.com>
<2B5285AC-88EA-49B6-AAE3-ED305A806764@mac.com>
Message-ID:
On Sun, Sep 13, 2009 at 12:31 AM, Ronald Oussoren
wrote:
> optparse's source code isn't cast in stone, therefore its interface can
> evolve.
While I agree with this comment in general, because optparse
officially exposes lots of internal details (OptionParser.largs,
OptionParser.rargs, Option.TYPE_CHECKER, Option.ALWAYS_TYPED_ACTIONS,
etc.) in practice it's extremely hard to evolve the optparse codebase
without introducing backwards compatibilities. If you don't believe
me, I recommend trying to implement argparse's support for
type= in optparse, while respecting Option.TYPES, etc. This
is one of the reasons in argparse I've been extremely conservative on
what constitutes the public API - I don't want the compatibility
nightmare that optparse has.
I guess one option would be to deprecate optparse's entire extension
mechanism and eventually replace it with argparse's, but I don't see
how that would really be any better than just including argparse
alongside optparse.
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From collinw at gmail.com Sun Sep 13 21:43:54 2009
From: collinw at gmail.com (Collin Winter)
Date: Sun, 13 Sep 2009 16:43:54 -0300
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <43aa6ff70909131243y2f98f641ofa2803325c03473a@mail.gmail.com>
On Thu, Sep 10, 2009 at 3:56 PM, Brett Cannon 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), out of the standard library
> and toss them into PyPI for those who refuse to switch. The standard
> library might not evolve a lot, but it isn't dead or in stone.
>
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
>
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
>
> I am +0
Brett, if you and Steven could work up a PEP on this subject, I think
that would go a long way toward moving the discussion about our option
parsing options forward. Having a concrete PEP to discuss will be more
useful and more focused than debating the abstract principles at play.
Thanks,
Collin Winter
From solipsis at pitrou.net Sun Sep 13 21:54:29 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Sun, 13 Sep 2009 21:54:29 +0200
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909131243y2f98f641ofa2803325c03473a@mail.gmail.com>
References:
<43aa6ff70909131243y2f98f641ofa2803325c03473a@mail.gmail.com>
Message-ID: <1252871669.5630.45.camel@localhost>
Le dimanche 13 septembre 2009 ? 16:43 -0300, Collin Winter a ?crit :
> Brett, if you and Steven could work up a PEP on this subject, I think
> that would go a long way toward moving the discussion about our option
> parsing options forward.
Option parsing options?
Wouldn't you prefer an argument parsing argument?
;)
From brett at python.org Sun Sep 13 22:01:43 2009
From: brett at python.org (Brett Cannon)
Date: Sun, 13 Sep 2009 13:01:43 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <43aa6ff70909131243y2f98f641ofa2803325c03473a@mail.gmail.com>
References:
<43aa6ff70909131243y2f98f641ofa2803325c03473a@mail.gmail.com>
Message-ID:
On Sun, Sep 13, 2009 at 12:43, Collin Winter wrote:
> On Thu, Sep 10, 2009 at 3:56 PM, Brett Cannon 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), out of the standard library
>> and toss them into PyPI for those who refuse to switch. The standard
>> library might not evolve a lot, but it isn't dead or in stone.
>>
>> But before this can happen, people need to have a general consensus
>> that I should bug Steven about contributing as it will require a PEP
>> from him. Steven already has commit privileges to maintenance from him
>> will not be a problem.
>>
>> So if you want this to actually happen and for me to start talking to
>> Steven just reply to this email w/ a vote.
>>
>> I am +0
>
> Brett, if you and Steven could work up a PEP on this subject, I think
> that would go a long way toward moving the discussion about our option
> parsing options forward. Having a concrete PEP to discuss will be more
> useful and more focused than debating the abstract principles at play.
I was actually planning on sending this email after I finished
checking my inbox. There seems to be enough support to warrant Steven
doing the PEP. We can then see what python-dev ends up thinking of the
whole thing.
-Brett
From steven.bethard at gmail.com Mon Sep 14 00:08:06 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Sun, 13 Sep 2009 15:08:06 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<43aa6ff70909131243y2f98f641ofa2803325c03473a@mail.gmail.com>
Message-ID:
On Sun, Sep 13, 2009 at 1:01 PM, Brett Cannon wrote:
> On Sun, Sep 13, 2009 at 12:43, Collin Winter wrote:
>> Brett, if you and Steven could work up a PEP on this subject, I think
>> that would go a long way toward moving the discussion about our option
>> parsing options forward. Having a concrete PEP to discuss will be more
>> useful and more focused than debating the abstract principles at play.
>
> I was actually planning on sending this email after I finished
> checking my inbox. There seems to be enough support to warrant Steven
> doing the PEP. We can then see what python-dev ends up thinking of the
> whole thing.
Sounds like a plan. I'll try to put a PEP together this week.
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From jnoller at gmail.com Mon Sep 14 17:13:12 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:13:12 -0400
Subject: [stdlib-sig] Breaking out the stdlib
Message-ID: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
Note, since I drafted this, brett's posted some thought on evolution
as well: http://sayspy.blogspot.com/2009/09/evolving-standard-library.html
So, here's a small pile of thoughts - the main driving force of which
was the common sentiment that was shown in the language summit at last
pycon. I'm mainly sending this out to evoke some discussion.
Last pycon, many of us agreed that the stdlib needed to be "broken"
out of the core within source control. AFAIK, this is still pending
the mercurial migration. The goal of this would be to have one common
stdlib shared amongst the implementations (Jython, Ironpython, etc).
Modules which were cpython-only (such as multiprocessing) would be
kept near-core, or marked as Cpython only.
This means we would have an interpreter/builtins section for cpython,
one for Jython, etc while they could all consume the central stdlib
blob.
In thinking about this even more over the past year(ish) - I've
wondered if the stdlib, and python-core should actually be *really*
separated. I'm a huge fan of batteries included, but I can see the
draw to a breakdown like this:
python-core (no stdlib, interpreter, core language)
python-stdlib (no core)
python-full (the works)
(Note this may actually *help* OS package maintainers.)
Doing this - in my mind - lends itself to the stdlib evolving faster.
Sure, there's a lot of good things in the stdlib, but frankly, we have
over 216 packages in it, and only 113 developers
(http://www.python.org/dev/committers). Of those 113 developers, how
many are actually active? How many of the modules in the stdlib
actually have owners with vested interest in maintaining them? How
many of them are evolutionary dead ends? From a packaging standpoint -
it's a lot easier to spin a new stdlib package and get it into an OS
upstream then the entire interpreter.
The running joke is that the stdlib is where modules go to die -
personally, I don't think this should be true - although it is true to
a certain extent. It's also true that some of the modules within the
stdlib are not best-of-breed - httplib2 vs. urllib/httplib comes to
mind (mainly because I'm dealing with that right now).
We all know that the stdlib has evolved over a great deal of time -
and over time the quality bar has changed (for the better) - but I'd
ask how to we take that quality bar and beat some of the
packages/modules we have in there with it? How do we make sure that
the stdlib is stable, best of breed and high quality?
I would say that it's entirely possible that some things simply need
to be removed; not just platform specific things, but things which
don't have maintainers on the hook to review their patches, things
which have low-to-no test coverage/docs.
I would personally like to see every single stdlib library have an
"owner" - I know, that's a long shot, but I really feel it's needed.
Otherwise you potentially have people reviewing patches for code they
may not fully understand, or not understand the ramifications of.
Breaking out is 1/2 the fight - the other half is cleaning it up/out -
removing things with low test coverage, poor docs or things which
simply are *not* the best option. We need to take a really hard look
at things in there and ask ourselves if the things in there meet our
collective quality bar, and if they don't: remove it. We want a good,
solid and shared-amongst implementations stdlib.
jesse
From doug.hellmann at gmail.com Mon Sep 14 17:20:31 2009
From: doug.hellmann at gmail.com (Doug Hellmann)
Date: Mon, 14 Sep 2009 11:20:31 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
Message-ID: <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
On Sep 14, 2009, at 11:13 AM, Jesse Noller wrote:
> Note, since I drafted this, brett's posted some thought on evolution
> as well: http://sayspy.blogspot.com/2009/09/evolving-standard-library.html
>
>
> So, here's a small pile of thoughts - the main driving force of which
> was the common sentiment that was shown in the language summit at last
> pycon. I'm mainly sending this out to evoke some discussion.
>
> Last pycon, many of us agreed that the stdlib needed to be "broken"
> out of the core within source control. AFAIK, this is still pending
> the mercurial migration. The goal of this would be to have one common
> stdlib shared amongst the implementations (Jython, Ironpython, etc).
> Modules which were cpython-only (such as multiprocessing) would be
> kept near-core, or marked as Cpython only.
>
> This means we would have an interpreter/builtins section for cpython,
> one for Jython, etc while they could all consume the central stdlib
> blob.
>
> In thinking about this even more over the past year(ish) - I've
> wondered if the stdlib, and python-core should actually be *really*
> separated. I'm a huge fan of batteries included, but I can see the
> draw to a breakdown like this:
>
> python-core (no stdlib, interpreter, core language)
> python-stdlib (no core)
> python-full (the works)
It would be interesting to know what stdlib modules are a minimum
requirement to install other packages with a tool like easy_install or
pip. Those might need to stay in "core" so that installing core gives
a minimally functional system.
Otherwise, I like the idea.
Doug
From jnoller at gmail.com Mon Sep 14 17:28:19 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:28:19 -0400
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
Message-ID: <4222a8490909140828q4a564520n973f87e0050f386f@mail.gmail.com>
On Thu, Sep 10, 2009 at 2:56 PM, Brett Cannon 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), out of the standard library
> and toss them into PyPI for those who refuse to switch. The standard
> library might not evolve a lot, but it isn't dead or in stone.
>
> But before this can happen, people need to have a general consensus
> that I should bug Steven about contributing as it will require a PEP
> from him. Steven already has commit privileges to maintenance from him
> will not be a problem.
>
> So if you want this to actually happen and for me to start talking to
> Steven just reply to this email w/ a vote.
>
> I am +0
More fuel for the pep(fire):
http://blogg.ingspree.net/blog/2009/09/14/opster/
From p.f.moore at gmail.com Mon Sep 14 17:35:54 2009
From: p.f.moore at gmail.com (Paul Moore)
Date: Mon, 14 Sep 2009 16:35:54 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
Message-ID: <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
2009/9/14 Doug Hellmann :
>> In thinking about this even more over the past year(ish) - I've
>> wondered if the stdlib, and python-core should actually be *really*
>> separated. I'm a huge fan of batteries included, but I can see the
>> draw to a breakdown like this:
>>
>> python-core (no stdlib, interpreter, core language)
>> python-stdlib (no core)
>> python-full (the works)
>
> It would be interesting to know what stdlib modules are a minimum
> requirement to install other packages with a tool like easy_install or pip.
> ?Those might need to stay in "core" so that installing core gives a
> minimally functional system.
>
> Otherwise, I like the idea.
Please remember that some establishments have restrictions that mean
that tools like easy_install or pip cannot be used. In locked-down
corporate environments, python-full is potentially all that will be
available (and maybe very specific "blessed" environment-specific 3rd
party modules).
But if the stdlib can be split out in such a way that it doesn't
adversely impact those environments, then maybe the extra flexibility
to evolve it would be helpful. (I'd like to know how that aligns with
the stated goal of stdlib stability, though - seems to me like it's
one or the other...)
Paul.
From michael at voidspace.org.uk Mon Sep 14 17:37:10 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 16:37:10 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
Message-ID: <4AAE6326.5090402@voidspace.org.uk>
Paul Moore wrote:
> 2009/9/14 Doug Hellmann :
>
>>> In thinking about this even more over the past year(ish) - I've
>>> wondered if the stdlib, and python-core should actually be *really*
>>> separated. I'm a huge fan of batteries included, but I can see the
>>> draw to a breakdown like this:
>>>
>>> python-core (no stdlib, interpreter, core language)
>>> python-stdlib (no core)
>>> python-full (the works)
>>>
>> It would be interesting to know what stdlib modules are a minimum
>> requirement to install other packages with a tool like easy_install or pip.
>> Those might need to stay in "core" so that installing core gives a
>> minimally functional system.
>>
>> Otherwise, I like the idea.
>>
>
> Please remember that some establishments have restrictions that mean
> that tools like easy_install or pip cannot be used. In locked-down
> corporate environments, python-full is potentially all that will be
> available (and maybe very specific "blessed" environment-specific 3rd
> party modules).
>
> But if the stdlib can be split out in such a way that it doesn't
> adversely impact those environments, then maybe the extra flexibility
> to evolve it would be helpful. (I'd like to know how that aligns with
> the stated goal of stdlib stability, though - seems to me like it's
> one or the other...)
>
For reference, where is that stated?
Michael
> Paul.
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From solipsis at pitrou.net Mon Sep 14 17:41:53 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Mon, 14 Sep 2009 17:41:53 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
Message-ID: <1252942913.5954.39.camel@localhost>
Le lundi 14 septembre 2009 ? 11:13 -0400, Jesse Noller a ?crit :
> Note, since I drafted this, brett's posted some thought on evolution
> as well: http://sayspy.blogspot.com/2009/09/evolving-standard-library.html
I tried to comment on it but, after a lot of pain editing my thoughts
(the text editor on that blog is completely broken in my browser), it
seems the comment got lost when I clicked "post"...
> In thinking about this even more over the past year(ish) - I've
> wondered if the stdlib, and python-core should actually be *really*
> separated. I'm a huge fan of batteries included, but I can see the
> draw to a breakdown like this:
>
> python-core (no stdlib, interpreter, core language)
> python-stdlib (no core)
Note, however, that an interpreter without stdlib is useless. Even basic
I/O (on Python 3) may not function properly. Conversely, the stdlib will
depend on certain interpreter features, or even implementation details.
So, while we can put them in separate VCSes, the development of
python-core and python-stdlib will be still be quite tied.
> python-full (the works)
What is this? core + stdlib?
> From a packaging standpoint -
> it's a lot easier to spin a new stdlib package and get it into an OS
> upstream then the entire interpreter.
I'm not convinced. A new stdlib can lead to as many compatibility
problems as a new interpreter does. And it seems that compatibility /
dependency management is the #1 problem in packaging.
> I would personally like to see every single stdlib library have an
> "owner" - I know, that's a long shot, but I really feel it's needed.
> Otherwise you potentially have people reviewing patches for code they
> may not fully understand, or not understand the ramifications of.
On the other hand, having an owner can be detrimental to maintenance.
For example, nobody wants to touch ElementTree except Fredrik, and
Fredrik isn't very active these days.
We should also say to no to externally-maintained modules, because it
completely ruins maintenance for us core developers.
From jnoller at gmail.com Mon Sep 14 17:42:57 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:42:57 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
Message-ID: <4222a8490909140842r61aae5eepd77c7349f48bd7d8@mail.gmail.com>
On Mon, Sep 14, 2009 at 11:35 AM, Paul Moore wrote:
> 2009/9/14 Doug Hellmann :
>>> In thinking about this even more over the past year(ish) - I've
>>> wondered if the stdlib, and python-core should actually be *really*
>>> separated. I'm a huge fan of batteries included, but I can see the
>>> draw to a breakdown like this:
>>>
>>> python-core (no stdlib, interpreter, core language)
>>> python-stdlib (no core)
>>> python-full (the works)
>>
>> It would be interesting to know what stdlib modules are a minimum
>> requirement to install other packages with a tool like easy_install or pip.
>> ?Those might need to stay in "core" so that installing core gives a
>> minimally functional system.
Brett mentions that in his post; a minimal bootstrap. I didn't think
terribly hard about that aspect.
>> Otherwise, I like the idea.
>
> Please remember that some establishments have restrictions that mean
> that tools like easy_install or pip cannot be used. In locked-down
> corporate environments, python-full is potentially all that will be
> available (and maybe very specific "blessed" environment-specific 3rd
> party modules).
Yup. But 90% of the time, you're getting python-full from your OS
vendor, and if not, you just click on the full url :)
> But if the stdlib can be split out in such a way that it doesn't
> adversely impact those environments, then maybe the extra flexibility
> to evolve it would be helpful. (I'd like to know how that aligns with
> the stated goal of stdlib stability, though - seems to me like it's
> one or the other...)
>
> Paul.
>
Note; I too still need a python-full implementation. My argument is to
split them within source, and be able to use a single "source" for all
the implementations.
Let me give a concrete example. Let's say Bob and Alice are working on
a device which is severely space constrained. Bob and Alice love
Python but they only use a tiny subset of the stdlib. Right now
getting *just* the interpreter is painful at best.
Bob and alice have a second issue though - they still want good,
useful things like sockets, threading, and other low-level and
standard libraries, but simply don't need mimetools, an http server,
14 xml processing libraries and a package which goes "ping!". They'd
like to "roll their own" using some bits from python-stdlib, and maybe
some third party bits here and there.
jesse
From solipsis at pitrou.net Mon Sep 14 17:51:17 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Mon, 14 Sep 2009 17:51:17 +0200
Subject: [stdlib-sig] Breaking out the stdlib
Message-ID: <1252943477.5954.42.camel@localhost>
(sorry for the double post, Jesse)
-------- Message transf?r? --------
Le lundi 14 septembre 2009 ? 11:42 -0400, Jesse Noller a ?crit :
>
> Bob and alice have a second issue though - they still want good,
> useful things like sockets, threading, and other low-level and
> standard libraries, but simply don't need mimetools, an http server,
> 14 xml processing libraries and a package which goes "ping!". They'd
> like to "roll their own" using some bits from python-stdlib, and maybe
> some third party bits here and there.
How is this easier with a separate stdlib? You have to do exactly the
same job you have to do nowadays: prune useless modules, add the useful
stuff you need.
From solipsis at pitrou.net Mon Sep 14 17:53:36 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Mon, 14 Sep 2009 17:53:36 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4222a8490909140846h4ad93cc6ie026b5ac63c935d2@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<1252942913.5954.39.camel@localhost>
<4222a8490909140846h4ad93cc6ie026b5ac63c935d2@mail.gmail.com>
Message-ID: <1252943616.5954.45.camel@localhost>
Le lundi 14 septembre 2009 ? 11:46 -0400, Jesse Noller a ?crit :
> Then Fredrik is no longer the maintainer - I'm looking at this through
> rather harsh eyes, true, but my goal is progress and quality - not
> being nice, so I'm sorry if I'm overly harsh.
I can agree with that, but it may imply some social / relational
problems if there isn't some formal (or widely agreed upon) process to
transfer ownership of a neglected module.
> And externally maintained modules are an oxymoron, no? :)
Perhaps, but they exist (e.g. simplejson).
From jnoller at gmail.com Mon Sep 14 17:53:17 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:53:17 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <1252943477.5954.42.camel@localhost>
References: <1252943477.5954.42.camel@localhost>
Message-ID: <4222a8490909140853y3cbbc16aq23f1d25e52ddf360@mail.gmail.com>
On Mon, Sep 14, 2009 at 11:51 AM, Antoine Pitrou wrote:
>
> (sorry for the double post, Jesse)
>
> -------- Message transf?r? --------
>
> Le lundi 14 septembre 2009 ? 11:42 -0400, Jesse Noller a ?crit :
>>
>> Bob and alice have a second issue though - they still want good,
>> useful things like sockets, threading, and other low-level and
>> standard libraries, but simply don't need mimetools, an http server,
>> 14 xml processing libraries and a package which goes "ping!". They'd
>> like to "roll their own" using some bits from python-stdlib, and maybe
>> some third party bits here and there.
>
> How is this easier with a separate stdlib? You have to do exactly the
> same job you have to do nowadays: prune useless modules, add the useful
> stuff you need.
>
Ah! You see, by it's very nature, breaking out the stdlib requires a
modification to the build tools which we lack now with the tight
coupling. We're going to need to build/evolve tools that would allow
multiple implementations to pull in modules, mark them as "jython
only" and so on.
Second, Bob and Alice would only need to hack the build process for
the stdlib *itself*. They can just download python-core, and *use*
that, their customizations are only to the python-stdlib.
Off the cuff (and no; I haven't thought about this terribly hard) you
could have a stdlib includes file ala Sphinx' index.rst file:
foo
bar
blatz
Which, when parsed, pulls in the stdlib modules to the build process.
If an item is omitted, it is included. Actually, a sphinx-*like*
structure makes a small amount of sense.
jesse
From jnoller at gmail.com Mon Sep 14 17:54:18 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:54:18 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <1252943616.5954.45.camel@localhost>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<1252942913.5954.39.camel@localhost>
<4222a8490909140846h4ad93cc6ie026b5ac63c935d2@mail.gmail.com>
<1252943616.5954.45.camel@localhost>
Message-ID: <4222a8490909140854y1ea1a250hcad1d1a13bf4744@mail.gmail.com>
On Mon, Sep 14, 2009 at 11:53 AM, Antoine Pitrou wrote:
> Le lundi 14 septembre 2009 ? 11:46 -0400, Jesse Noller a ?crit :
>> Then Fredrik is no longer the maintainer - I'm looking at this through
>> rather harsh eyes, true, but my goal is progress and quality - not
>> being nice, so I'm sorry if I'm overly harsh.
>
> I can agree with that, but it may imply some social / relational
> problems if there isn't some formal (or widely agreed upon) process to
> transfer ownership of a neglected module.
Agreed.
>> And externally maintained modules are an oxymoron, no? :)
>
> Perhaps, but they exist (e.g. simplejson).
>
That one seems like an odd exception to the rule. I don't know how
that one evolved.
From jnoller at gmail.com Mon Sep 14 17:46:40 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:46:40 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <1252942913.5954.39.camel@localhost>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<1252942913.5954.39.camel@localhost>
Message-ID: <4222a8490909140846h4ad93cc6ie026b5ac63c935d2@mail.gmail.com>
On Mon, Sep 14, 2009 at 11:41 AM, Antoine Pitrou wrote:
> Le lundi 14 septembre 2009 ? 11:13 -0400, Jesse Noller a ?crit :
>> Note, since I drafted this, brett's posted some thought on evolution
>> as well: http://sayspy.blogspot.com/2009/09/evolving-standard-library.html
>
> I tried to comment on it but, after a lot of pain editing my thoughts
> (the text editor on that blog is completely broken in my browser), it
> seems the comment got lost when I clicked "post"...
>
>> In thinking about this even more over the past year(ish) - I've
>> wondered if the stdlib, and python-core should actually be *really*
>> separated. I'm a huge fan of batteries included, but I can see the
>> draw to a breakdown like this:
>>
>> python-core (no stdlib, interpreter, core language)
>> python-stdlib (no core)
>
> Note, however, that an interpreter without stdlib is useless. Even basic
> I/O (on Python 3) may not function properly. Conversely, the stdlib will
> depend on certain interpreter features, or even implementation details.
> So, while we can put them in separate VCSes, the development of
> python-core and python-stdlib will be still be quite tied.
Understood; there is a simple "basic set of widgets" we do *need* -
but it's terribly smaller than what we have now.
>> python-full (the works)
>
> What is this? core + stdlib?
Yes.
>> From a packaging standpoint -
>> it's a lot easier to spin a new stdlib package and get it into an OS
>> upstream then the entire interpreter.
>
> I'm not convinced. A new stdlib can lead to as many compatibility
> problems as a new interpreter does. And it seems that compatibility /
> dependency management is the #1 problem in packaging.
I'm not trying to solve that, Tarek is ;)
>> I would personally like to see every single stdlib library have an
>> "owner" - I know, that's a long shot, but I really feel it's needed.
>> Otherwise you potentially have people reviewing patches for code they
>> may not fully understand, or not understand the ramifications of.
>
> On the other hand, having an owner can be detrimental to maintenance.
> For example, nobody wants to touch ElementTree except Fredrik, and
> Fredrik isn't very active these days.
> We should also say to no to externally-maintained modules, because it
> completely ruins maintenance for us core developers.
Then Fredrik is no longer the maintainer - I'm looking at this through
rather harsh eyes, true, but my goal is progress and quality - not
being nice, so I'm sorry if I'm overly harsh.
And externally maintained modules are an oxymoron, no? :)
jesse
From jnoller at gmail.com Mon Sep 14 17:58:49 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 11:58:49 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
Message-ID: <4222a8490909140858g1eccacdydadc1d71107fc615@mail.gmail.com>
On Mon, Sep 14, 2009 at 11:13 AM, Jesse Noller wrote:
> Note, since I drafted this, brett's posted some thought on evolution
> as well: http://sayspy.blogspot.com/2009/09/evolving-standard-library.html
>
>
> So, here's a small pile of thoughts - the main driving force of which
> was the common sentiment that was shown in the language summit at last
> pycon. I'm mainly sending this out to evoke some discussion.
>
> Last pycon, many of us agreed that the stdlib needed to be "broken"
> out of the core within source control. AFAIK, this is still pending
> the mercurial migration. The goal of this would be to have one common
> stdlib shared amongst the implementations (Jython, Ironpython, etc).
> Modules which were cpython-only (such as multiprocessing) would be
> kept near-core, or marked as Cpython only.
>
> This means we would have an interpreter/builtins section for cpython,
> one for Jython, etc while they could all consume the central stdlib
> blob.
>
> In thinking about this even more over the past year(ish) - I've
> wondered if the stdlib, and python-core should actually be *really*
> separated. I'm a huge fan of batteries included, but I can see the
> draw to a breakdown like this:
>
> python-core (no stdlib, interpreter, core language)
> python-stdlib (no core)
> python-full (the works)
>
> (Note this may actually *help* OS package maintainers.)
>
> Doing this - in my mind - lends itself to the stdlib evolving faster.
> Sure, there's a lot of good things in the stdlib, but frankly, we have
> over 216 packages in it, and only 113 developers
> (http://www.python.org/dev/committers). Of those 113 developers, how
> many are actually active? How many of the modules in the stdlib
> actually have owners with vested interest in maintaining them? How
> many of them are evolutionary dead ends? From a packaging standpoint -
> it's a lot easier to spin a new stdlib package and get it into an OS
> upstream then the entire interpreter.
>
> The running joke is that the stdlib is where modules go to die -
> personally, I don't think this should be true - although it is true to
> a certain extent. It's also true that some of the modules within the
> stdlib are not best-of-breed - httplib2 vs. urllib/httplib comes to
> mind (mainly because I'm dealing with that right now).
>
> We all know that the stdlib has evolved over a great deal of time -
> and over time the quality bar has changed (for the better) - but I'd
> ask how to we take that quality bar and beat some of the
> packages/modules we have in there with it? How do we make sure that
> the stdlib is stable, best of breed and high quality?
>
> I would say that it's entirely possible that some things simply need
> to be removed; not just platform specific things, but things which
> don't have maintainers on the hook to review their patches, things
> which have low-to-no test coverage/docs.
>
> I would personally like to see every single stdlib library have an
> "owner" - I know, that's a long shot, but I really feel it's needed.
> Otherwise you potentially have people reviewing patches for code they
> may not fully understand, or not understand the ramifications of.
>
> Breaking out is 1/2 the fight - the other half is cleaning it up/out -
> removing things with low test coverage, poor docs or things which
> simply are *not* the best option. We need to take a really hard look
> at things in there and ask ourselves if the things in there meet our
> collective quality bar, and if they don't: remove it. We want a good,
> solid and shared-amongst implementations stdlib.
>
> jesse
>
Oh, and when I talk about pulling it out - I mean tests, docs, etc.
This way all other implementations could use the same tests, docs,
etc.
From ctb at msu.edu Mon Sep 14 18:07:14 2009
From: ctb at msu.edu (C. Titus Brown)
Date: Mon, 14 Sep 2009 09:07:14 -0700
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
Message-ID: <20090914160714.GE15328@idyll.org>
On Mon, Sep 14, 2009 at 04:35:54PM +0100, Paul Moore wrote:
-> 2009/9/14 Doug Hellmann :
-> >> In thinking about this even more over the past year(ish) - I've
-> >> wondered if the stdlib, and python-core should actually be *really*
-> >> separated. I'm a huge fan of batteries included, but I can see the
-> >> draw to a breakdown like this:
-> >>
-> >> python-core (no stdlib, interpreter, core language)
-> >> python-stdlib (no core)
-> >> python-full (the works)
-> >
-> > It would be interesting to know what stdlib modules are a minimum
-> > requirement to install other packages with a tool like easy_install or pip.
-> > ?Those might need to stay in "core" so that installing core gives a
-> > minimally functional system.
-> >
-> > Otherwise, I like the idea.
->
-> Please remember that some establishments have restrictions that mean
-> that tools like easy_install or pip cannot be used. In locked-down
-> corporate environments, python-full is potentially all that will be
-> available (and maybe very specific "blessed" environment-specific 3rd
-> party modules).
->
-> But if the stdlib can be split out in such a way that it doesn't
-> adversely impact those environments, then maybe the extra flexibility
-> to evolve it would be helpful. (I'd like to know how that aligns with
-> the stated goal of stdlib stability, though - seems to me like it's
-> one or the other...)
I'd like to -1 this whole discussion by saying that you guys are basing
this whole thing on your mature, competent skills of Python programming
and computer use. Corporations and beginning programmers need something
straightforward, simple, with "batteries included" in order to do
something sane with Python in large multi-user environments.
We can discuss *which* batteries should be included -- bsddb was taken
out, sqlite3 looks like a long-term winner -- but IMVSO pruning the
stdlib should not be seriously consider until we have an excellent,
time-tested, battle-proven completely automatic package installation
system.
To me, this could be like the decision to simultaneously release python
3.x and python 2.x distributions, but much worse: even more confusion-
engendering and detrimental to short- and medium-term adoption of
Python.
cheers,
--titus
--
C. Titus Brown, ctb at msu.edu
From michael at voidspace.org.uk Mon Sep 14 18:09:16 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 17:09:16 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <20090914160714.GE15328@idyll.org>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org>
Message-ID: <4AAE6AAC.6090109@voidspace.org.uk>
C. Titus Brown wrote:
> On Mon, Sep 14, 2009 at 04:35:54PM +0100, Paul Moore wrote:
> -> 2009/9/14 Doug Hellmann :
> -> >> In thinking about this even more over the past year(ish) - I've
> -> >> wondered if the stdlib, and python-core should actually be *really*
> -> >> separated. I'm a huge fan of batteries included, but I can see the
> -> >> draw to a breakdown like this:
> -> >>
> -> >> python-core (no stdlib, interpreter, core language)
> -> >> python-stdlib (no core)
> -> >> python-full (the works)
> -> >
> -> > It would be interesting to know what stdlib modules are a minimum
> -> > requirement to install other packages with a tool like easy_install or pip.
> -> > ?Those might need to stay in "core" so that installing core gives a
> -> > minimally functional system.
> -> >
> -> > Otherwise, I like the idea.
> ->
> -> Please remember that some establishments have restrictions that mean
> -> that tools like easy_install or pip cannot be used. In locked-down
> -> corporate environments, python-full is potentially all that will be
> -> available (and maybe very specific "blessed" environment-specific 3rd
> -> party modules).
> ->
> -> But if the stdlib can be split out in such a way that it doesn't
> -> adversely impact those environments, then maybe the extra flexibility
> -> to evolve it would be helpful. (I'd like to know how that aligns with
> -> the stated goal of stdlib stability, though - seems to me like it's
> -> one or the other...)
>
> I'd like to -1 this whole discussion by saying that you guys are basing
> this whole thing on your mature, competent skills of Python programming
> and computer use. Corporations and beginning programmers need something
> straightforward, simple, with "batteries included" in order to do
> something sane with Python in large multi-user environments.
>
> We can discuss *which* batteries should be included -- bsddb was taken
> out, sqlite3 looks like a long-term winner -- but IMVSO pruning the
> stdlib should not be seriously consider until we have an excellent,
> time-tested, battle-proven completely automatic package installation
> system.
>
> To me, this could be like the decision to simultaneously release python
> 3.x and python 2.x distributions, but much worse: even more confusion-
> engendering and detrimental to short- and medium-term adoption of
> Python.
>
>
I think we're discussing the organisation of development repositories
and *not* changing the default distributions - just making alternative
distributions easier. (at least -1 if that's not the context in which
we're discussing this and +1 if it is.)
Michael
>
>
> cheers,
> --titus
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From brett at python.org Mon Sep 14 18:16:59 2009
From: brett at python.org (Brett Cannon)
Date: Mon, 14 Sep 2009 09:16:59 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4222a8490909140828q4a564520n973f87e0050f386f@mail.gmail.com>
References:
<4222a8490909140828q4a564520n973f87e0050f386f@mail.gmail.com>
Message-ID:
On Mon, Sep 14, 2009 at 08:28, Jesse Noller wrote:
> On Thu, Sep 10, 2009 at 2:56 PM, Brett Cannon 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), out of the standard library
>> and toss them into PyPI for those who refuse to switch. The standard
>> library might not evolve a lot, but it isn't dead or in stone.
>>
>> But before this can happen, people need to have a general consensus
>> that I should bug Steven about contributing as it will require a PEP
>> from him. Steven already has commit privileges to maintenance from him
>> will not be a problem.
>>
>> So if you want this to actually happen and for me to start talking to
>> Steven just reply to this email w/ a vote.
>>
>> I am +0
>
> More fuel for the pep(fire):
>
> http://blogg.ingspree.net/blog/2009/09/14/opster/
It's only more fuel in terms of acknowledging there is another
approach using decorators. But since no library that takes that
approach is near to being considered best-of-breed by the community or
is as stable as argparse I don't consider it that big of a deal.
-Brett
From jnoller at gmail.com Mon Sep 14 18:19:57 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 12:19:57 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE6AAC.6090109@voidspace.org.uk>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org> <4AAE6AAC.6090109@voidspace.org.uk>
Message-ID: <4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
On Mon, Sep 14, 2009 at 12:09 PM, Michael Foord
wrote:
> C. Titus Brown wrote:
>>
>> On Mon, Sep 14, 2009 at 04:35:54PM +0100, Paul Moore wrote:
>> -> 2009/9/14 Doug Hellmann :
>> -> >> In thinking about this even more over the past year(ish) - I've
>> -> >> wondered if the stdlib, and python-core should actually be *really*
>> -> >> separated. I'm a huge fan of batteries included, but I can see the
>> -> >> draw to a breakdown like this:
>> -> >>
>> -> >> python-core (no stdlib, interpreter, core language)
>> -> >> python-stdlib (no core)
>> -> >> python-full (the works)
>> -> >
>> -> > It would be interesting to know what stdlib modules are a minimum
>> -> > requirement to install other packages with a tool like easy_install
>> or pip.
>> -> > ?Those might need to stay in "core" so that installing core gives a
>> -> > minimally functional system.
>> -> >
>> -> > Otherwise, I like the idea.
>> -> -> Please remember that some establishments have restrictions that mean
>> -> that tools like easy_install or pip cannot be used. In locked-down
>> -> corporate environments, python-full is potentially all that will be
>> -> available (and maybe very specific "blessed" environment-specific 3rd
>> -> party modules).
>> -> -> But if the stdlib can be split out in such a way that it doesn't
>> -> adversely impact those environments, then maybe the extra flexibility
>> -> to evolve it would be helpful. (I'd like to know how that aligns with
>> -> the stated goal of stdlib stability, though - seems to me like it's
>> -> one or the other...)
>>
>> I'd like to -1 this whole discussion by saying that you guys are basing
>> this whole thing on your mature, competent skills of Python programming
>> and computer use. ?Corporations and beginning programmers need something
>> straightforward, simple, with "batteries included" in order to do
>> something sane with Python in large multi-user environments.
>>
>> We can discuss *which* batteries should be included -- bsddb was taken
>> out, sqlite3 looks like a long-term winner -- but IMVSO pruning the
>> stdlib should not be seriously consider until we have an excellent,
>> time-tested, battle-proven completely automatic package installation
>> system.
>>
>> To me, this could be like the decision to simultaneously release python
>> 3.x and python 2.x distributions, but much worse: even more confusion-
>> engendering and detrimental to short- and medium-term adoption of
>> Python.
>>
>>
>
> I think we're discussing the organisation of development repositories and
> *not* changing the default distributions - just making alternative
> distributions easier. (at least -1 if that's not the context in which we're
> discussing this and +1 if it is.)
>
> Michael
>
Michael is correct; Titus is incorrect.
Titus; I'm taking in the needs of those just starting with python - I
would not, WOULD NOT have started using python if it had not come with
batteries. That's why I left python-full in the email.
What I am proposing, however, is we:
1> Separate them in source
2> Offer "core, stdlib, full" downloads - so we keep the simple,
simple - and allow for the more complex/nuanced uses.
3> Be aggressive with the *quality* of the modules
Sure, having batteries is fantastic. Until you being to realize that
some modules are broken, not up to date with current technology, etc,
etc. We have to be aggressive with cleaning it up.
In short; leaving crap in there "just because" doesn't make it better
- it just makes it bigger.
I can't even begin to describe the pain I went through when - new to
python, I tried to deal with XML parsing. Or the joy I felt when I
sent email for the first time using smtplib.
Things within the stdlib must have a high quality bar, and should
really represent the "one way of doing something" - meaning best of
breed, high quality, idiomatic, etc.
jesse
From michael at voidspace.org.uk Mon Sep 14 18:25:16 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 17:25:16 +0100
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<4222a8490909140828q4a564520n973f87e0050f386f@mail.gmail.com>
Message-ID: <4AAE6E6C.7050601@voidspace.org.uk>
Brett Cannon wrote:
> On Mon, Sep 14, 2009 at 08:28, Jesse Noller wrote:
>
>> On Thu, Sep 10, 2009 at 2:56 PM, Brett Cannon 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), out of the standard library
>>> and toss them into PyPI for those who refuse to switch. The standard
>>> library might not evolve a lot, but it isn't dead or in stone.
>>>
>>> But before this can happen, people need to have a general consensus
>>> that I should bug Steven about contributing as it will require a PEP
>>> from him. Steven already has commit privileges to maintenance from him
>>> will not be a problem.
>>>
>>> So if you want this to actually happen and for me to start talking to
>>> Steven just reply to this email w/ a vote.
>>>
>>> I am +0
>>>
>> More fuel for the pep(fire):
>>
>> http://blogg.ingspree.net/blog/2009/09/14/opster/
>>
>
> It's only more fuel in terms of acknowledging there is another
> approach using decorators. But since no library that takes that
> approach is near to being considered best-of-breed by the community or
> is as stable as argparse I don't consider it that big of a deal.
>
Although adding a decorator based approach to argparse shouldn't be out
of the question. Then there really would be MTOWTDI...
Michael
> -Brett
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From jnoller at gmail.com Mon Sep 14 18:30:11 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 12:30:11 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <20090914160714.GE15328@idyll.org>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org>
Message-ID: <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
On Mon, Sep 14, 2009 at 12:07 PM, C. Titus Brown wrote:
> I'd like to -1 this whole discussion by saying that you guys are basing
> this whole thing on your mature, competent skills of Python programming
> and computer use. ?Corporations and beginning programmers need something
> straightforward, simple, with "batteries included" in order to do
> something sane with Python in large multi-user environments.
And just to hit on this specifically: Actually, I'm not. Try
explaining what modules in the stdlib are of questionable use, and why
not to use them to your boss, who is learning Python.
Them: "Why shouldn't I used httplib?"
Me: Reasons A,B,C - just use httplib2
Them: "Why don't they just fix that?"
That's for starters. If you want batteries included to mean something
more than "we got junk in our trunk" then we should raise the bar. Not
to mention over 216 modules? Less than a handful of active committers?
It's not sustainable.
> We can discuss *which* batteries should be included -- bsddb was taken
> out, sqlite3 looks like a long-term winner -- but IMVSO pruning the
> stdlib should not be seriously consider until we have an excellent,
> time-tested, battle-proven completely automatic package installation
> system.
Pruning must occur regardless of how easy it is to install something
"voted off the island".
> To me, this could be like the decision to simultaneously release python
> 3.x and python 2.x distributions, but much worse: even more confusion-
> engendering and detrimental to short- and medium-term adoption of
> Python.
All an end user sees:
click here to download Python 3.0-Full
*smaller print* click here for the interpreter-core
*smaller print* click here for the stdlib
Otherwise, they will see the eventual deprecation of things which are
*broken* or have *no tests* to even prove if they aren't between
releases.
jesse
From brett at python.org Mon Sep 14 18:30:14 2009
From: brett at python.org (Brett Cannon)
Date: Mon, 14 Sep 2009 09:30:14 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To: <4AAE6E6C.7050601@voidspace.org.uk>
References:
<4222a8490909140828q4a564520n973f87e0050f386f@mail.gmail.com>
<4AAE6E6C.7050601@voidspace.org.uk>
Message-ID:
On Mon, Sep 14, 2009 at 09:25, Michael Foord wrote:
> Brett Cannon wrote:
>>
>> On Mon, Sep 14, 2009 at 08:28, Jesse Noller wrote:
>>
>>>
>>> On Thu, Sep 10, 2009 at 2:56 PM, Brett Cannon 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), out of the standard library
>>>> and toss them into PyPI for those who refuse to switch. The standard
>>>> library might not evolve a lot, but it isn't dead or in stone.
>>>>
>>>> But before this can happen, people need to have a general consensus
>>>> that I should bug Steven about contributing as it will require a PEP
>>>> from him. Steven already has commit privileges to maintenance from him
>>>> will not be a problem.
>>>>
>>>> So if you want this to actually happen and for me to start talking to
>>>> Steven just reply to this email w/ a vote.
>>>>
>>>> I am +0
>>>>
>>>
>>> More fuel for the pep(fire):
>>>
>>> http://blogg.ingspree.net/blog/2009/09/14/opster/
>>>
>>
>> It's only more fuel in terms of acknowledging there is another
>> approach using decorators. But since no library that takes that
>> approach is near to being considered best-of-breed by the community or
>> is as stable as argparse I don't consider it that big of a deal.
>>
>
> Although adding a decorator based approach to argparse shouldn't be out of
> the question. Then there really would be MTOWTDI...
It's not, but then I would want it out in the wild first to work out
the API, so still don't find it reasonable for this PEP.
-Brett
From solipsis at pitrou.net Mon Sep 14 18:53:27 2009
From: solipsis at pitrou.net (Antoine Pitrou)
Date: Mon, 14 Sep 2009 18:53:27 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org> <4AAE6AAC.6090109@voidspace.org.uk>
<4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
Message-ID: <1252947207.7398.8.camel@localhost>
Le lundi 14 septembre 2009 ? 12:19 -0400, Jesse Noller a ?crit :
> Sure, having batteries is fantastic. Until you being to realize that
> some modules are broken, not up to date with current technology, etc,
> etc. We have to be aggressive with cleaning it up.
[...]
>
> Things within the stdlib must have a high quality bar, and should
> really represent the "one way of doing something" - meaning best of
> breed, high quality, idiomatic, etc.
Have you read the thread about argparse and the deprecation of other
modules?
You are conflating two things:
1. the presence of somewhat outdated or too low-level modules
2. the desire to have best-of-breed options available in the stdlib
We can do 2. without undoing 1. As Marc-Andr? pointed out, even in py3k
we only deprecated a handful of very marginal modules. Emphasizing the
right modules in the documentation is probably a reasonably good answer
to the problem of having several modules fulfilling the same needs. No
need to go on a deprecation frenzy and start annoying the two thirds of
our user base just because we decided to be pure rather than practical.
From jnoller at gmail.com Mon Sep 14 19:00:15 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 13:00:15 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <1252947207.7398.8.camel@localhost>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org> <4AAE6AAC.6090109@voidspace.org.uk>
<4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
<1252947207.7398.8.camel@localhost>
Message-ID: <4222a8490909141000i686bdeeaq9308d546afd7824b@mail.gmail.com>
On Mon, Sep 14, 2009 at 12:53 PM, Antoine Pitrou wrote:
> Le lundi 14 septembre 2009 ? 12:19 -0400, Jesse Noller a ?crit :
>> Sure, having batteries is fantastic. Until you being to realize that
>> some modules are broken, not up to date with current technology, etc,
>> etc. We have to be aggressive with cleaning it up.
> [...]
>>
>> Things within the stdlib must have a high quality bar, and should
>> really represent the "one way of doing something" - meaning best of
>> breed, high quality, idiomatic, etc.
>
> Have you read the thread about argparse and the deprecation of other
> modules?
>
> You are conflating two things:
> 1. the presence of somewhat outdated or too low-level modules
> 2. the desire to have best-of-breed options available in the stdlib
>
> We can do 2. without undoing 1. As Marc-Andr? pointed out, even in py3k
> we only deprecated a handful of very marginal modules. Emphasizing the
> right modules in the documentation is probably a reasonably good answer
> to the problem of having several modules fulfilling the same needs. No
> need to go on a deprecation frenzy and start annoying the two thirds of
> our user base just because we decided to be pure rather than practical.
>
IMHO, and in the opinions of others, the deprecation within py3k did
not go far enough.
This is not purity vs. practicality. In fact I'd argue (and will! I'm
warnin ya!) that leaving stuff in there because we don't want to
remove it for fear some other piece of code in the wild may depend on
it is completely impractical.
We do not have the people, the time, the funding, etc to handle a
great big Java-esque pile of "permanently deprecated, slightly
discouraged" code.
If we do not want it in the stdlib, it should be deprecated; and then
removed. Leaving it there in perpetuity means some person, 5 years
after we deprecate it, will write code against it - which, by this
reasoning we will have to support for another 10 years, even *after*
it's no longer maintained.
jesse
From steven.bethard at gmail.com Mon Sep 14 19:04:19 2009
From: steven.bethard at gmail.com (Steven Bethard)
Date: Mon, 14 Sep 2009 10:04:19 -0700
Subject: [stdlib-sig] should we try to add argparse?
In-Reply-To:
References:
<4222a8490909140828q4a564520n973f87e0050f386f@mail.gmail.com>
<4AAE6E6C.7050601@voidspace.org.uk>
Message-ID:
On Mon, Sep 14, 2009 at 9:30 AM, Brett Cannon wrote:
> On Mon, Sep 14, 2009 at 09:25, Michael Foord wrote:
>> Although adding a decorator based approach to argparse shouldn't be out of
>> the question. Then there really would be MTOWTDI...
>
> It's not, but then I would want it out in the wild first to work out
> the API, so still don't find it reasonable for this PEP.
It's out of scope for the PEP, but it's definitely under consideration
as a feature enhancement request for the next major version of
argparse. But that's really just like a feature request for any
library.
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus
From mal at egenix.com Mon Sep 14 19:06:29 2009
From: mal at egenix.com (M.-A. Lemburg)
Date: Mon, 14 Sep 2009 19:06:29 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org>
<4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
Message-ID: <4AAE7815.9020101@egenix.com>
I don't really understand how breaking something as useful as
the stdlib into smaller pieces would help with anything.
The main purpose of a library is that you have an *integrated* set
of modules that are known and tested to work together.
The stdlib has gone a long way in trying to achieve that and it's
getting better at it with every release.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 14 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
From michael at voidspace.org.uk Mon Sep 14 19:06:53 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 18:06:53 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <1252947207.7398.8.camel@localhost>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org>
<4AAE6AAC.6090109@voidspace.org.uk> <4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
<1252947207.7398.8.camel@localhost>
Message-ID: <4AAE782D.8020800@voidspace.org.uk>
Antoine Pitrou wrote:
> Le lundi 14 septembre 2009 ? 12:19 -0400, Jesse Noller a ?crit :
>
>> Sure, having batteries is fantastic. Until you being to realize that
>> some modules are broken, not up to date with current technology, etc,
>> etc. We have to be aggressive with cleaning it up.
>>
> [...]
>
>> Things within the stdlib must have a high quality bar, and should
>> really represent the "one way of doing something" - meaning best of
>> breed, high quality, idiomatic, etc.
>>
>
> Have you read the thread about argparse and the deprecation of other
> modules?
>
> You are conflating two things:
> 1. the presence of somewhat outdated or too low-level modules
> 2. the desire to have best-of-breed options available in the stdlib
>
> We can do 2. without undoing 1. As Marc-Andr? pointed out, even in py3k
> we only deprecated a handful of very marginal modules. Emphasizing the
> right modules in the documentation is probably a reasonably good answer
> to the problem of having several modules fulfilling the same needs. No
> need to go on a deprecation frenzy and start annoying the two thirds of
> our user base just because we decided to be pure rather than practical.
>
>
I think both 1) and 2) are on topic for a discussion of how we deal with
standard library quality.
No-one argues that the standard library should evolve quickly but there
do seem to be those arguing that it should *never* evolve.
I agree with Jesse (FWIW) that the presence of obsolete modules is
actually damaging to Python. Deprecating and removing modules over a
four or five years (PendingDeprecation -> Deprecation -> removal) is
more than slow enough for a stable system that is the Python standard
library.
I would love to see a PEP about further standard library clean-ups,
perhaps slating modules for *eventual* removal in Python 3.4 / 3.5 and
only when they are clearly not useful, replaced or broken and not
maintained - and preferably where there is a clear alternative.
Michael
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From michael at voidspace.org.uk Mon Sep 14 19:07:58 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 18:07:58 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE7815.9020101@egenix.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org> <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com>
Message-ID: <4AAE786E.6020207@voidspace.org.uk>
M.-A. Lemburg wrote:
> I don't really understand how breaking something as useful as
> the stdlib into smaller pieces would help with anything.
>
> The main purpose of a library is that you have an *integrated* set
> of modules that are known and tested to work together.
>
> The stdlib has gone a long way in trying to achieve that and it's
> getting better at it with every release.
>
>
The particular motivation is to make it easier for other implementations
to reuse the standard library. It was something discussed (with the
maintainers of some of these implementations) at the Python Language Summit.
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From orestis at orestis.gr Mon Sep 14 19:13:30 2009
From: orestis at orestis.gr (Orestis Markou)
Date: Mon, 14 Sep 2009 20:13:30 +0300
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE7815.9020101@egenix.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org>
<4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com>
Message-ID: <4019B3EC-7065-40F8-BD3B-7CD4000092B2@orestis.gr>
On Sep 14, 2009, at 8:06 PM, M.-A. Lemburg wrote:
> I don't really understand how breaking something as useful as
> the stdlib into smaller pieces would help with anything.
>
> The main purpose of a library is that you have an *integrated* set
> of modules that are known and tested to work together.
No one has suggested that - just that the core can be downloaded
without the stdlib, for the people that might need it.
>
> The stdlib has gone a long way in trying to achieve that and it's
> getting better at it with every release.
>
> --
> Marc-Andre Lemburg
> eGenix.com
>
> Professional Python Services directly from the Source (#1, Sep 14
> 2009)
>>>> Python/Zope Consulting and Support ... http://
>>>> www.egenix.com/
>>>> mxODBC.Zope.Database.Adapter ... http://
>>>> zope.egenix.com/
>>>> mxODBC, mxDateTime, mxTextTools ... http://
>>>> python.egenix.com/
> ________________________________________________________________________
>
> ::: Try our new mxODBC.Connect Python Database Interface for
> free ! ::::
>
>
> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
> Registered at Amtsgericht Duesseldorf: HRB 46611
> http://www.egenix.com/company/contact/
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
From orestis at orestis.gr Mon Sep 14 19:22:27 2009
From: orestis at orestis.gr (Orestis Markou)
Date: Mon, 14 Sep 2009 20:22:27 +0300
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE786E.6020207@voidspace.org.uk>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org> <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com> <4AAE786E.6020207@voidspace.org.uk>
Message-ID:
On Sep 14, 2009, at 8:07 PM, Michael Foord wrote:
> M.-A. Lemburg wrote:
>> I don't really understand how breaking something as useful as
>> the stdlib into smaller pieces would help with anything.
>>
>> The main purpose of a library is that you have an *integrated* set
>> of modules that are known and tested to work together.
>>
>> The stdlib has gone a long way in trying to achieve that and it's
>> getting better at it with every release.
>>
>>
> The particular motivation is to make it easier for other
> implementations to reuse the standard library. It was something
> discussed (with the maintainers of some of these implementations) at
> the Python Language Summit.
I'd also like to point out the psychological ramifications of making
the stdlib and optional component (even if most users will actually
download the python-full bundle).
Right now when looking for a library to perform some task, the first
place anyone (at least, newcomers) looks is the stdlib. If there's
something there, then most people will stop looking. This is good
because python should come with batteries included. However, a lot of
people will then tend to think "stdlib is sacred" and will never
evaluate the better solutions that are out there.
If the python core devs split out the stdlib into an optional
download, they are making a statement - that is, the stdlib is just a
set of components that mostly work together, nothing more, nothing
less. No one should be compelled to use them just because they
originate from python-core. Hopefully both outside and inside packages
will be judged on merit, and a set of de facto standard packages will
be crowdsourced over time.
Of course, making that statement without a simple way of finding,
installing and uninstalling packages is dangerous, but as said before,
other people are trying to solve that.
Orestis
>
> Michael
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
>
>
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
From mal at egenix.com Mon Sep 14 19:28:56 2009
From: mal at egenix.com (M.-A. Lemburg)
Date: Mon, 14 Sep 2009 19:28:56 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE786E.6020207@voidspace.org.uk>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org> <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com> <4AAE7815.9020101@egenix.com>
<4AAE786E.6020207@voidspace.org.uk>
Message-ID: <4AAE7D58.1040105@egenix.com>
Michael Foord wrote:
> M.-A. Lemburg wrote:
>> I don't really understand how breaking something as useful as
>> the stdlib into smaller pieces would help with anything.
>>
>> The main purpose of a library is that you have an *integrated* set
>> of modules that are known and tested to work together.
>>
>> The stdlib has gone a long way in trying to achieve that and it's
>> getting better at it with every release.
>>
>>
> The particular motivation is to make it easier for other implementations
> to reuse the standard library. It was something discussed (with the
> maintainers of some of these implementations) at the Python Language
> Summit.
The stdlib already has a lot of support for different Python
implementation built right into the code.
There will always be some things that don't work in certain
implementations, but if that's the problem, we could just
add an assert at the top of the module or raise an ImportError
to warn the user.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 14 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
From fwierzbicki at gmail.com Mon Sep 14 19:28:47 2009
From: fwierzbicki at gmail.com (Frank Wierzbicki)
Date: Mon, 14 Sep 2009 13:28:47 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE786E.6020207@voidspace.org.uk>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org>
<4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com> <4AAE786E.6020207@voidspace.org.uk>
Message-ID: <4dab5f760909141028v62527232v8e549cbecafcc8fe@mail.gmail.com>
On Mon, Sep 14, 2009 at 1:07 PM, Michael Foord wrote:
> The particular motivation is to make it easier for other implementations to
> reuse the standard library. It was something discussed (with the maintainers
> of some of these implementations) at the Python Language Summit.
Speaking for Jython, it would be very helpful if the stdlib was
considered a separate entity in a more official way than it is now.
Jython already uses the stdlib this way (sort of), we have an
svn:externals entry that just pulls the stdlib down. Today, we
maintain a largish number of the modules with local patches that
replace some modules as part of our build process. It would be nicer
if we could do less patching at build time. BTW - I don't mean that I
expect others to do this work for us, a couple of us have commit
rights to help this along.
-Frank
From mal at egenix.com Mon Sep 14 19:34:08 2009
From: mal at egenix.com (M.-A. Lemburg)
Date: Mon, 14 Sep 2009 19:34:08 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4dab5f760909141028v62527232v8e549cbecafcc8fe@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org> <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com> <4AAE7815.9020101@egenix.com>
<4AAE786E.6020207@voidspace.org.uk>
<4dab5f760909141028v62527232v8e549cbecafcc8fe@mail.gmail.com>
Message-ID: <4AAE7E90.8030509@egenix.com>
Frank Wierzbicki wrote:
> On Mon, Sep 14, 2009 at 1:07 PM, Michael Foord wrote:
>> The particular motivation is to make it easier for other implementations to
>> reuse the standard library. It was something discussed (with the maintainers
>> of some of these implementations) at the Python Language Summit.
> Speaking for Jython, it would be very helpful if the stdlib was
> considered a separate entity in a more official way than it is now.
> Jython already uses the stdlib this way (sort of), we have an
> svn:externals entry that just pulls the stdlib down. Today, we
> maintain a largish number of the modules with local patches that
> replace some modules as part of our build process. It would be nicer
> if we could do less patching at build time. BTW - I don't mean that I
> expect others to do this work for us, a couple of us have commit
> rights to help this along.
Why don't you try to get those changes into the stdlib ?
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 14 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
From michael at voidspace.org.uk Mon Sep 14 19:34:00 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 18:34:00 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE7D58.1040105@egenix.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org> <4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com> <4AAE7815.9020101@egenix.com>
<4AAE786E.6020207@voidspace.org.uk> <4AAE7D58.1040105@egenix.com>
Message-ID: <4AAE7E88.6040007@voidspace.org.uk>
M.-A. Lemburg wrote:
> Michael Foord wrote:
>
>> M.-A. Lemburg wrote:
>>
>>> I don't really understand how breaking something as useful as
>>> the stdlib into smaller pieces would help with anything.
>>>
>>> The main purpose of a library is that you have an *integrated* set
>>> of modules that are known and tested to work together.
>>>
>>> The stdlib has gone a long way in trying to achieve that and it's
>>> getting better at it with every release.
>>>
>>>
>>>
>> The particular motivation is to make it easier for other implementations
>> to reuse the standard library. It was something discussed (with the
>> maintainers of some of these implementations) at the Python Language
>> Summit.
>>
>
> The stdlib already has a lot of support for different Python
> implementation built right into the code.
>
> There will always be some things that don't work in certain
> implementations, but if that's the problem, we could just
> add an assert at the top of the module or raise an ImportError
> to warn the user.
>
>
The maintainers of the other implementations felt it would be simpler to
track the standard library if it was maintained in a separate
repository, which wasn't felt to be a problem by the Python
core-developers. The standard library would continue to include code to
maintain compatibility (where possible) with alternative implementations.
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From collinw at gmail.com Mon Sep 14 19:34:36 2009
From: collinw at gmail.com (Collin Winter)
Date: Mon, 14 Sep 2009 13:34:36 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE7D58.1040105@egenix.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org>
<4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com> <4AAE786E.6020207@voidspace.org.uk>
<4AAE7D58.1040105@egenix.com>
Message-ID: <43aa6ff70909141034k19ad3db3o2f166516677e8c06@mail.gmail.com>
On Mon, Sep 14, 2009 at 1:28 PM, M.-A. Lemburg wrote:
> Michael Foord wrote:
>> M.-A. Lemburg wrote:
>>> I don't really understand how breaking something as useful as
>>> the stdlib into smaller pieces would help with anything.
>>>
>>> The main purpose of a library is that you have an *integrated* set
>>> of modules that are known and tested to work together.
>>>
>>> The stdlib has gone a long way in trying to achieve that and it's
>>> getting better at it with every release.
>>>
>>>
>> The particular motivation is to make it easier for other implementations
>> to reuse the standard library. It was something discussed (with the
>> maintainers of some of these implementations) at the Python Language
>> Summit.
>
> The stdlib already has a lot of support for different Python
> implementation built right into the code.
>
> There will always be some things that don't work in certain
> implementations, but if that's the problem, we could just
> add an assert at the top of the module or raise an ImportError
> to warn the user.
The proposal was to separate the stdlib into two logical components:
1) a shared, this-has-to-work-everywhere standard library that all
Python implementations share on equal terms;
2) an implementation-specific standard library for things that are
either implementation details or that require
Jython/IronPython/PyPy-specific implementations.
The test suite would be similarly exposed and shared between all
implementations on equal terms: one set of this-has-to-work-everywhere
tests, one set of implementation-specific tests layered on top of the
shared test suite (think garbage collection vs refcounting, etc). Same
idea for documentation.
The idea is to a) put CPython on a more equal footing with the other
implementations, and b) to remove the need to have
Jython/IronPython/PyPy-specific cases in the CPython standard library.
I believe there was a more formal explanation of the plan sent to this
list and/or python-dev shortly after PyCon US 2009; I'll see if I can
dig it up.
Collin Winter
From michael at voidspace.org.uk Mon Sep 14 19:36:44 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 18:36:44 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4dab5f760909141028v62527232v8e549cbecafcc8fe@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org>
<4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com> <4AAE786E.6020207@voidspace.org.uk>
<4dab5f760909141028v62527232v8e549cbecafcc8fe@mail.gmail.com>
Message-ID: <4AAE7F2C.2010306@voidspace.org.uk>
Frank Wierzbicki wrote:
> On Mon, Sep 14, 2009 at 1:07 PM, Michael Foord wrote:
>
>> The particular motivation is to make it easier for other implementations to
>> reuse the standard library. It was something discussed (with the maintainers
>> of some of these implementations) at the Python Language Summit.
>>
> Speaking for Jython, it would be very helpful if the stdlib was
> considered a separate entity in a more official way than it is now.
> Jython already uses the stdlib this way (sort of), we have an
> svn:externals entry that just pulls the stdlib down. Today, we
> maintain a largish number of the modules with local patches that
> replace some modules as part of our build process. It would be nicer
> if we could do less patching at build time. BTW - I don't mean that I
> expect others to do this work for us, a couple of us have commit
> rights to help this along.
>
And indeed it was to help move this process along, alongside improving
the Python test suite for alternative implementations, that many of us
joined this otherwise-mostly-defunct mailing list.
Not a lot concrete has happened so far, so it is good that Jesse has
brought it up. I guess the details will impact (and be impacted by) the
move to Mercurial, so maybe Dirkjan should be involved?
Michael
> -Frank
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From fwierzbicki at gmail.com Mon Sep 14 19:47:13 2009
From: fwierzbicki at gmail.com (Frank Wierzbicki)
Date: Mon, 14 Sep 2009 13:47:13 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE782D.8020800@voidspace.org.uk>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org> <4AAE6AAC.6090109@voidspace.org.uk>
<4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
<1252947207.7398.8.camel@localhost>
<4AAE782D.8020800@voidspace.org.uk>
Message-ID: <4dab5f760909141047y36c90274o4ceb4f21c8324ea8@mail.gmail.com>
On Mon, Sep 14, 2009 at 1:06 PM, Michael Foord wrote:
> No-one argues that the standard library should evolve quickly but there do
> seem to be those arguing that it should *never* evolve.
I'll add my voice against the folks who want the stdlib to never
evolve. Java's standard library provides a nice cautionary example.
> I agree with Jesse (FWIW) that the presence of obsolete modules is actually
> damaging to Python. Deprecating and removing modules over a four or five
> years (PendingDeprecation -> Deprecation -> removal) is more than slow
> enough for a stable system that is the Python standard library.
>
> I would love to see a PEP about further standard library clean-ups, perhaps
> slating modules for *eventual* removal in Python 3.4 / 3.5 and only when
> they are clearly not useful, replaced or broken and not maintained - and
> preferably where there is a clear alternative.
I too would love to see this -- it would have the added advantage of
lowering the priority for the implementation of deprecated modules
that we haven't gotten around to implementing in Jython yet :)
-Frank
From fwierzbicki at gmail.com Mon Sep 14 19:50:06 2009
From: fwierzbicki at gmail.com (Frank Wierzbicki)
Date: Mon, 14 Sep 2009 13:50:06 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE7E90.8030509@egenix.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org>
<4222a8490909140930y39fe0e07i2a5d66eb6d9b92ef@mail.gmail.com>
<4AAE7815.9020101@egenix.com> <4AAE786E.6020207@voidspace.org.uk>
<4dab5f760909141028v62527232v8e549cbecafcc8fe@mail.gmail.com>
<4AAE7E90.8030509@egenix.com>
Message-ID: <4dab5f760909141050h316501e1qa20e344661780cea@mail.gmail.com>
On Mon, Sep 14, 2009 at 1:34 PM, M.-A. Lemburg wrote:
> Why don't you try to get those changes into the stdlib ?
That is the current plan until a stdlib separation actually happens
(and will remain the plan if such a separation does not occur).
-Frank
From mal at egenix.com Mon Sep 14 20:26:44 2009
From: mal at egenix.com (M.-A. Lemburg)
Date: Mon, 14 Sep 2009 20:26:44 +0200
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4dab5f760909141047y36c90274o4ceb4f21c8324ea8@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org>
<4AAE6AAC.6090109@voidspace.org.uk> <4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com> <1252947207.7398.8.camel@localhost> <4AAE782D.8020800@voidspace.org.uk>
<4dab5f760909141047y36c90274o4ceb4f21c8324ea8@mail.gmail.com>
Message-ID: <4AAE8AE4.30104@egenix.com>
Frank Wierzbicki wrote:
> On Mon, Sep 14, 2009 at 1:06 PM, Michael Foord wrote:
>> No-one argues that the standard library should evolve quickly but there do
>> seem to be those arguing that it should *never* evolve.
> I'll add my voice against the folks who want the stdlib to never
> evolve. Java's standard library provides a nice cautionary example.
I don't think anyone has voiced such an opinion. There are different
views on what "evolve" should mean and when to apply what actions,
though.
Replacing prefectly fine working code just for the fun of it, does
not count much as argument for evolving the stdlib.
There have to be really good reasons to drop an existing tested and
proven solution in favor of a new implementation that only adds one
or two tricks to the set of already available features, but at the
same time breaks the published API.
The bar is a lot lower for modifying existing modules, e.g. to
enhance or add functionality:
http://www.python.org/dev/peps/pep-0387/
BTW and just because this line gets misquoted so often: the Zen
says "There should be one -- and preferably only one -- obvious way
to do it." ... People tend to forget the "obvious" in that line.
There is often more than one way to look at a problem, so it's
not against the Zen to have more than one implementation to tackle
a certain problem in the stdlib.
A good example of this is the XML package of the stdlib: the modules
all work on XML, but each in its own separate way, specifically
designed with a certain approach in mind.
The urllibs are another example: they both allow accessing URLs
in various ways, but the way they are adapted to fit a particular
need is completely different.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 14 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
From barry at python.org Mon Sep 14 20:54:55 2009
From: barry at python.org (Barry Warsaw)
Date: Mon, 14 Sep 2009 14:54:55 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
Message-ID: <95CA9B37-A650-42C2-9B7B-958B32F53145@python.org>
On Sep 14, 2009, at 11:35 AM, Paul Moore wrote:
> Please remember that some establishments have restrictions that mean
> that tools like easy_install or pip cannot be used. In locked-down
> corporate environments, python-full is potentially all that will be
> available (and maybe very specific "blessed" environment-specific 3rd
> party modules).
Splitting things out for developers is not the same as keeping that
split visible for distributions, either via tarball, binary from us,
or through distros. In fact, I'd venture to guess that most locked
down establishments are not going to be installing Python from us;
they'll get it through their operating system vendor (well, thank
goodness I don't have to know what locked down Windows users have to
go through ;).
Still, there's no reason why we couldn't ship sumo packages with all
those batteries included again.
-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:
From jnoller at gmail.com Mon Sep 14 20:56:30 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 14:56:30 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <95CA9B37-A650-42C2-9B7B-958B32F53145@python.org>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<95CA9B37-A650-42C2-9B7B-958B32F53145@python.org>
Message-ID: <4222a8490909141156h4140273eo9c97e5239bdf22aa@mail.gmail.com>
On Mon, Sep 14, 2009 at 2:54 PM, Barry Warsaw wrote:
> On Sep 14, 2009, at 11:35 AM, Paul Moore wrote:
>
>> Please remember that some establishments have restrictions that mean
>> that tools like easy_install or pip cannot be used. In locked-down
>> corporate environments, python-full is potentially all that will be
>> available (and maybe very specific "blessed" environment-specific 3rd
>> party modules).
>
> Splitting things out for developers is not the same as keeping that split
> visible for distributions, either via tarball, binary from us, or through
> distros. ?In fact, I'd venture to guess that most locked down establishments
> are not going to be installing Python from us; they'll get it through their
> operating system vendor (well, thank goodness I don't have to know what
> locked down Windows users have to go through ;).
>
> Still, there's no reason why we couldn't ship sumo packages with all those
> batteries included again.
>
> -Barry
Yup; that was spelled out in the OP - I would like: core, stdlib,
everything as 3 packages. 99% of people will download the 3rd.
From michael at voidspace.org.uk Mon Sep 14 21:08:47 2009
From: michael at voidspace.org.uk (Michael Foord)
Date: Mon, 14 Sep 2009 20:08:47 +0100
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE8AE4.30104@egenix.com>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com> <8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com> <79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com> <20090914160714.GE15328@idyll.org>
<4AAE6AAC.6090109@voidspace.org.uk> <4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com> <1252947207.7398.8.camel@localhost> <4AAE782D.8020800@voidspace.org.uk>
<4dab5f760909141047y36c90274o4ceb4f21c8324ea8@mail.gmail.com>
<4AAE8AE4.30104@egenix.com>
Message-ID: <4AAE94BF.8080407@voidspace.org.uk>
M.-A. Lemburg wrote:
> Frank Wierzbicki wrote:
>
>> On Mon, Sep 14, 2009 at 1:06 PM, Michael Foord wrote:
>>
>>> No-one argues that the standard library should evolve quickly but there do
>>> seem to be those arguing that it should *never* evolve.
>>>
>> I'll add my voice against the folks who want the stdlib to never
>> evolve. Java's standard library provides a nice cautionary example.
>>
>
> I don't think anyone has voiced such an opinion. There are different
> views on what "evolve" should mean and when to apply what actions,
> though.
>
>
From a recent post in this thread:
"That is, actually, pretty much what I want a stdlib for. I don't want
it to contain the newest, greatest, and best ways of doing things. I
want it to contain the things that people are willing to maintain until
hell freezes over, which will largely be things that aren't ever going
to change until hell freezes over."
> Replacing prefectly fine working code just for the fun of it, does
> not count much as argument for evolving the stdlib.
>
>
Unless you are attacking a complete strawman, which is unhelpful and
pointless so please refrain, can you point out who is suggesting
replacing working code "just for the fun of it"?
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
From jnoller at gmail.com Mon Sep 14 21:19:05 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 15:19:05 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To:
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<95CA9B37-A650-42C2-9B7B-958B32F53145@python.org>
<4222a8490909141156h4140273eo9c97e5239bdf22aa@mail.gmail.com>
Message-ID: <4222a8490909141219s16f04666ic64a711146821d06@mail.gmail.com>
On Mon, Sep 14, 2009 at 3:11 PM, Brett Cannon wrote:
> On Mon, Sep 14, 2009 at 11:56, Jesse Noller wrote:
>> On Mon, Sep 14, 2009 at 2:54 PM, Barry Warsaw wrote:
>>> On Sep 14, 2009, at 11:35 AM, Paul Moore wrote:
>>>
>>>> Please remember that some establishments have restrictions that mean
>>>> that tools like easy_install or pip cannot be used. In locked-down
>>>> corporate environments, python-full is potentially all that will be
>>>> available (and maybe very specific "blessed" environment-specific 3rd
>>>> party modules).
>>>
>>> Splitting things out for developers is not the same as keeping that split
>>> visible for distributions, either via tarball, binary from us, or through
>>> distros. ?In fact, I'd venture to guess that most locked down establishments
>>> are not going to be installing Python from us; they'll get it through their
>>> operating system vendor (well, thank goodness I don't have to know what
>>> locked down Windows users have to go through ;).
>>>
>>> Still, there's no reason why we couldn't ship sumo packages with all those
>>> batteries included again.
>>>
>>> -Barry
>>
>> Yup; that was spelled out in the OP - I would like: core, stdlib,
>> everything as 3 packages. 99% of people will download the 3rd.
>
> Just to toss in my opinion, I think the standard library should be
> broken out in the VCS to make it very obvious what all Python VMs
> should come with and work with, but I don't think we should package it
> up for distribution separately. CPython should probably shift to
> having a slightly less stranglehold on the standard library than it
> has now. This would also help legitimize the other VMs.
>
> But I see no benefit for the general populace in having a version of
> Python w/o a standard library. Anyone who has funky space requirements
> can just do the leg work needed prune down the standard library to
> what they need.
>
> -Brett
>
Yeah: Except for those people that means custom compiling an
interpreter too. The tight coupling is just painful. When I want to
trim the standard library, I should not have to hack the build
scripts, compile an interpreter, etc, etc.
I'm really strongly (duh) for massive decoupling between the two,
especially within the build system.
How is there any harm in offering 3 downloads? The obvious thing is to
click on the big "get some pythons on" button which gets what we know
as python today.
Then there are two little buttons: get "just this" or "just that".
From brett at python.org Mon Sep 14 21:21:10 2009
From: brett at python.org (Brett Cannon)
Date: Mon, 14 Sep 2009 12:21:10 -0700
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To: <4AAE782D.8020800@voidspace.org.uk>
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<20090914160714.GE15328@idyll.org> <4AAE6AAC.6090109@voidspace.org.uk>
<4222a8490909140919m1c167f1fs26fb077ad9c6aa4a@mail.gmail.com>
<1252947207.7398.8.camel@localhost> <4AAE782D.8020800@voidspace.org.uk>
Message-ID:
On Mon, Sep 14, 2009 at 10:06, Michael Foord wrote:
> Antoine Pitrou wrote:
>>
>> Le lundi 14 septembre 2009 ? 12:19 -0400, Jesse Noller a ?crit :
>>
>>>
>>> Sure, having batteries is fantastic. Until you being to realize that
>>> some modules are broken, not up to date with current technology, etc,
>>> etc. We have to be aggressive with cleaning it up.
>>>
>>
>> [...]
>>
>>>
>>> Things within the stdlib must have a high quality bar, and should
>>> really represent the "one way of doing something" - meaning best of
>>> breed, high quality, idiomatic, etc.
>>>
>>
>> Have you read the thread about argparse and the deprecation of other
>> modules?
>>
>> You are conflating two things:
>> 1. the presence of somewhat outdated or too low-level modules
>> 2. the desire to have best-of-breed options available in the stdlib
>>
>> We can do 2. without undoing 1. As Marc-Andr? pointed out, even in py3k
>> we only deprecated a handful of very marginal modules. Emphasizing the
>> right modules in the documentation is probably a reasonably good answer
>> to the problem of having several modules fulfilling the same needs. No
>> need to go on a deprecation frenzy and start annoying the two thirds of
>> our user base just because we decided to be pure rather than practical.
>>
>>
>
> I think both 1) and 2) are on topic for a discussion of how we deal with
> standard library quality.
>
> No-one argues that the standard library should evolve quickly but there do
> seem to be those arguing that it should *never* evolve.
>
> I agree with Jesse (FWIW) that the presence of obsolete modules is actually
> damaging to Python.
Both in reputation and in developer time. It doesn't help our image
when someone finds a module in our standard library that is
practically unmaintained and goes w/o having patches applied. I think
this is Jesse's motivation behind wanting owners of modules; since the
core devs are volunteers we only patch stuff we care about, which
leads to orphaned modules rotting in the stdlib. And tying into this,
having to patch and fix modules that are outdated and not widely used
is a waste of time when it could have been spent working on code that
is more impactful on the wider community.
> Deprecating and removing modules over a four or five
> years (PendingDeprecation -> Deprecation -> removal) is more than slow
> enough for a stable system that is the Python standard library.
>
Well, to get your four or five year warning you need to have three
releases (3 * 18 months = 4.5 years), so releases would have to go
PendingDeprecation -> Deprecation -> Deprecation -> removal.
> I would love to see a PEP about further standard library clean-ups, perhaps
> slating modules for *eventual* removal in Python 3.4 / 3.5 and only when
> they are clearly not useful, replaced or broken and not maintained - and
> preferably where there is a clear alternative.
You can go back and look at early drafts of PEP 3108 for ideas. To
simply keep myself from burning out and making sure something happened
I had to cut a lot out, but I bet there is stuff we can toss (I mean
do we really need to be supporting any multimedia formats like
sunau?). If there is enough support we can try to come up with
standard library inclusion guidelines (what we are striving for,
quality standards, etc.) and then apply those to the existing stdlib
to potentially clean it up.
-Brett
From jnoller at gmail.com Mon Sep 14 21:29:27 2009
From: jnoller at gmail.com (Jesse Noller)
Date: Mon, 14 Sep 2009 15:29:27 -0400
Subject: [stdlib-sig] Breaking out the stdlib
In-Reply-To:
References: <4222a8490909140813n715a6350s6b647ab8555e424b@mail.gmail.com>
<8B5044E6-DA8A-4C25-BD49-D76EAC0D2091@gmail.com>
<79990c6b0909140835p5d387730jd48b33b7b2341c12@mail.gmail.com>
<95CA9B37-A650-42C2-9B7B-958B32F53145@python.org>
<4222a8490909141156h4140273eo9c97e5239bdf22aa@mail.gmail.com>