Re: [stdlib-sig] Breaking out the stdlib
When I said that I wanted things in the stdlibrary to 'never change until hell freezes over' I didn't mean that the std library shouldn't evolve by adding new modules. What I meant was that the old, perfectly good working modules who haven't needed changes for years and years and years don't get summarily yanked out because people 'don't want to maintain them any more'. There is a case to be made that code that refers to hardware that hasn't been used for years and years can be removed, and perhaps other things which are similarily unused at this point in time can be removed, but nobody is making that claim about getopt and optparse. Indeed, right now, if you write code that parses options you are most likely doing one of 4 things: a) using getopt b) using optparse c) using some third party module for parsing that is currently under development d) writing your own option parser in python Now, for years I have been telling people that d) was by far the poorest way of doing things. Don't reinvent the wheel, and all that. But on the day that you yank getopt and optparse out of the library, you will have made this terrible advice to give my poor hospital clients. And you will have made all the time I spent ripping out hand-made option parsers and replacing them with getopt instead wasted time that I billed my clients for. Instead of giving them a robust solution that will require little or no maintainance, I have given them a zillion scripts, _all of which will suddenly break one day_. And since the pure python parsers that I never got around to converting will probably still be working, the people who did d) will get the last laugh. So -- real use case time -- the hospitals where I have done a lot of work have some really weird equipment. And using them costs real money, uses up real lab supplies, and conceivably can ruin a sample that you will find it inconvenient or impossible to replace. There are all sorts of weird dependencies among the various options you can use to operate the devices. If you have specified option K, you may not also specify option M or N, and if you have specified option L, you must also specify option Q, or option R and option S. Thus the whole exercise of writing a script to use the equipment becomes as matter of validating the options you selected are complete and non-contradictory, and then going out and exercising the hardware. You can build a validating option parser by hand (option d) or using getopt (option a). You will find it difficult to the point of near impossibility to build one using optparse, because optparse specifically rejects the notion of 'required options' which is the meat-and-potoatoes part of this app. I found this out when optparse went into the standard library, and was touted at being superior to getopt. I tried it, and tried to subclass it, and talked to its author about whether it could be changed to support my use case, and even volunteered to write code to change it, but was firmly told that optparse worked the way it did, on purpose, in order to prevent the sort of use that I wanted to make of it, and that patches to make that possible were entirely unwelcome. At which point I go back to using getopt. There is no particular hard feelings about this -- I figure that the people who want to use optparse can use it, and getopt is here for the people who won't, or can't. But when later in time people suggested getting rid of getopt because 'it was old' and 'optparse was better' I realise, a long time when it was too late to do anything, that I should have been spearheading the 'I don't want optparse in the standard library' effort, on the grounds that it didn't support 'required arguments'. That fight might have become nasty. Far better to allow multiple ways of doing things. As far as I can tell most software packages go through three stages: Stage A: "rapid development" Expect changes to the API. New releases can and will break all the existing code out there. There are lots of bugs, but it is hard to tell a bug from a thing that is incomplete sometimes. Stage B: "things have (mostly) settled down" Major releases may break existing code. Minor ones will not. The bugs are being shaken out. Development slows. There are two major variants in Stage B code. B-1: has an active maintainer(s) B-2: isn't being maintained any more Stage C: "until hell freezes over" The author of the package has determined that he has solved his problem as well as he ever cares to. He considers his package 'finished', 'done', or 'complete'. No more bugs are being found. No more development is planned. It also has two variants. C-1: The maintainer will fix major bugs should you ever find any. C-2: The maintainer won't. He might even be dead. Some software packages never reach stage C. Forgetting those that are abandoned by their authors, for the moment while they are still in stage B, we are still left with many that deal with the rapidly changing world in such a way that their development can never be said to be done. Now software in Stage A doesn't need maintenance so much as development in the first place. And software in stage B requires a lot of maintainance. But most software in stage C requires little or no maintenance, precisely because it is unchanging. So, if you decide to change how Exceptions are inherited, for instance, you may break a whole lot of Stage C: code, but fixing them is part of the general problem of 'fixing exceptions everywhere' not part of 'fixing getopt'. Now I think that there is some confusion here between packages who are in Stage C: and packages who are in Stage B-2: around here. The B-2 packages are probably the core developers greatest headache. But I don't see the C packages as being troublesome at all. If you don't like them, it isn't because of the work that maintaining is costing you. It may be that hatred for the B-2's has become a general hatred of all packages with no maintainers, which is an understandable mistake. But from reading this list I get the distinct impression that some people just hate C:s _precisely because they are old and unchanging_, and would continue to hate them for that reason even if I was in some way able to guarantee that they would never need any maintenance ever again. These people are condemning the packages I love best for the reason they are the packages I love best. And that is the attitude I would like to change. It boils down to a matter of trust. My customers trust me to not give them ticking time bombs that will all stop working one day, and I trust you not to go about gratuitously removing perfectly working code that is quietly sitting there, not needing any changes, and not bothering anybody. When you break that contract with me, my customers suffer, I suffer, and the people who said 'You shouldn't have coded it in Python in the first place, but picked a mature language like Java' are completely vindicated. Deciding that we want to be more flexible than Java and actually retire some old packages doesn't mean that we should condone retiring old packages because they are old and haven't changed in a long while. There are a great number of packages that should be kept for this very reason, and I think that getopt is a great example of one of them. So, if we are going to reorganise the standard library, even if only conceptually, I'd like to toss in my suggestions for improvement. I'd like to make it possible to tag modules. One good set of tags would be 'CPython', 'Jython', 'PyPy', etc. When you want to build your own version of the standard library you just get the modules that are tagged for you. Another good tag is 'who is maintaining this thing'. Which could be 'no one'. Along with this information I would like to know how long this person has promised to maintain the thing, and at what point in time (if ever) does he expect this module to become And then I would like something along my A B and C scheme, though of course the number of categories is likely to change and they should have meaningful names (which is something I am particularly poor at coming up with). This would mean as a developer I could take a look at the standard library and find out: getopt: maintained by (nobody). Entered the standard library in 1990. current status (dead as a doornail). Expected to reach the status (dead as a doornail) by (already reached). Alternatives: optparse, argparse, optfunct* (not in the standard library) argparse: maintained by (Steven Bethard) Entered the standard library in 2009. current status (a moderate amount of change is happening). Expected to reach the status (dead as a doornail) by (2012). Has never reached the status 'dead as a doornail'. Alternatives: optparse, getopt, optfunct* (not in the standard library) or maybe we will see argparse: maintained by (Steven Bethard) Entered the standard library in (2009). current status (a moderate amount of change is happening). Expected to reach that status (dead as a doornail) by (never, Steve expects that this module will be under continuous development through its lifetime). Has never reached the status 'dead as a doornail'. Alternatives: optparse, getopt, optfunct* (not in the standard library) we can also get things like: unittest: maintained by (Michael Foord). Entered the standard library in 1999-or-whenever-the-real-date-was. Current status (a moderate amount of change is happening). Expected to reach the status (dead as a doornail) by (2012). This module reached the status of 'dead as a doornail' in 2002 but was subsequently revived by Michael Foord in 2008. Alternatives py.test* (not in the standard library) nose* (not in the standard library) elementtree: maintained by (noone) Entered the standard library in 2005-or-whenever-the-real-date-was. Current status (no changes are happening). Expected to reach the status of 'dead as a doornail' by (unknown. Fredrik Lundh, the original author of the module is no longer maintaining it. It is incomplete, and a new maintainer is actively sought.) No alternatives. or maybe we get elementtree: maintained by (noone) Entered the standard library in 2005-or-whenever-the-real-date-was. Current status (no changes are happening). Expected to reach the status of 'dead as a doornail' by (unknown. Fredrik Lundh, the original author of the module is no longer maintaining it. It is quite finished, and the proposal has been made to call it dead as a doornail in 2010.) No alternatives. I would find this very useful, as would anybody who wants to use dead-as-a doornail whenever possible. And I think that it would give a certain breathing space for python core developers -- breaking things when the library involved was tagged as 'under moderate development' is a much less heinous sin than breaking the ones that are 'dead as a doornail'. People like Michael would understand that when they re-open something like unittest, they are taking on a responsibility which comes with a much larger burden of 'don't break existing code'. After all, if I had wanted new unittesting features, I would be using py.test or nose. When I use unittest at all, these days, you can take it a a very strong indication that either I, or my customers, are vastly more interested in stability than new features, and will be insensed if something breaks in the name of 'this is better'. So what do you think of this proposal? Laura
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point. [Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.] I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
M.-A. Lemburg wrote:
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point.
[Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.]
Right - but part of the specific problem with optparse is that in many situations it does a very inadequate job (i.e. it "it does what it is meant to do" but not what many people "need it to do") and is designed in such a way that *required* functionality can't be added in a backwards compatible way. That is not "good code" (by my reckoning). Michael
I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Sep 15 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/
Sorry if I am a bit off base, but I have only been browsing this thread... I think that at some point the really old stuff that has a replacement should get removed. Why not provide a LegacyStdlib egg on Pypi? This could create a compatibility layer and help those that do not want to change their code . On 9/15/09, Michael Foord <michael@voidspace.org.uk> wrote:
M.-A. Lemburg wrote:
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point.
[Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.]
Right - but part of the specific problem with optparse is that in many situations it does a very inadequate job (i.e. it "it does what it is meant to do" but not what many people "need it to do") and is designed in such a way that *required* functionality can't be added in a backwards compatible way.
That is not "good code" (by my reckoning).
Michael
I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Sep 15 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/
-- http://www.ironpythoninaction.com/
_______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig
-- Sent from my mobile device David blog: http://www.traceback.org twitter: http://twitter.com/dstanek
2009/9/15 Michael Foord <michael@voidspace.org.uk>:
Right - but part of the specific problem with optparse is that in many situations it does a very inadequate job (i.e. it "it does what it is meant to do" but not what many people "need it to do") and is designed in such a way that *required* functionality can't be added in a backwards compatible way.
That is not "good code" (by my reckoning).
As such, optparse needs to change (assuming that the stdlib *should* be "good code"). There are requirements (feature requests at least, possibly even bugs) which need addressing. If no maintainer can be found to do this, then optparse is de facto dead and unmaintained.(Laura's B-2). No-one has made a statement about what should be done with B-2 code in the stdlib, but I can see good arguments for allowing the possibility of dropping it in favour of a replacement library. If someone wants to argue that optparse is class "C" (ie, it is "finished" and "complete") then that's a different matter. Requests for optparse to support required arguments, or to better support user extension, would then be closed "won't fix - this is by design". And in that case, it *is* more or less by definition "good code" - it fulfills its aims, it just doesn't aim to do what Michael states many people "need it to do" above. (Personally, I don't see that code can be described as "good" if it doesn't aim to do what people need, but maybe someone wants to argue this). I think the issue with argparse vs optparse is that argparse appears to be intended as "optparse done right" (I can't comment on whether it is, just that's what it looks like). So having both in the stdlib looks like duplication (far more so than having getopt along with either). If optparse was still evolving, it should be possible to devise some way of merging the two (possibly with API breakages, admittedly). The dilemma here seems to be that optparse won't change, and argparse offers extra functionality that people actually want (and would like in the stdlib). Something needs to give. Paul.
Paul Moore wrote:
2009/9/15 Michael Foord <michael@voidspace.org.uk>:
Right - but part of the specific problem with optparse is that in many situations it does a very inadequate job (i.e. it "it does what it is meant to do" but not what many people "need it to do") and is designed in such a way that *required* functionality can't be added in a backwards compatible way.
That is not "good code" (by my reckoning).
As such, optparse needs to change (assuming that the stdlib *should* be "good code"). There are requirements (feature requests at least, possibly even bugs) which need addressing.
If no maintainer can be found to do this, then optparse is de facto dead and unmaintained.(Laura's B-2). No-one has made a statement about what should be done with B-2 code in the stdlib, but I can see good arguments for allowing the possibility of dropping it in favour of a replacement library.
If someone wants to argue that optparse is class "C" (ie, it is "finished" and "complete") then that's a different matter. Requests for optparse to support required arguments, or to better support user extension, would then be closed "won't fix - this is by design". And in that case, it *is* more or less by definition "good code" - it fulfills its aims, it just doesn't aim to do what Michael states many people "need it to do" above. (Personally, I don't see that code can be described as "good" if it doesn't aim to do what people need, but maybe someone wants to argue this).
I think the issue with argparse vs optparse is that argparse appears to be intended as "optparse done right" (I can't comment on whether it is, just that's what it looks like). So having both in the stdlib looks like duplication (far more so than having getopt along with either). If optparse was still evolving, it should be possible to devise some way of merging the two (possibly with API breakages, admittedly). The dilemma here seems to be that optparse won't change, and argparse offers extra functionality that people actually want (and would like in the stdlib). Something needs to give.
Seems like a good summary. I hope there will be a PEP from Steven for the inclusion of argparse. It's all a bit of a moot debate because we don't even need to decide whether to remove optparse now - we can start it down the deprecation road and *possibly* remove it eventually... Personally I would like to see dead modules removed (whilst some would like to see the whole standard library dead ;-) - but our deprecation process is deliberately slow so that issues like this can be deliberated on a case by case basis over a period of years. Michael
Paul.
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
Paul Moore wrote:
2009/9/15 Michael Foord <michael@voidspace.org.uk>:
Right - but part of the specific problem with optparse is that in many situations it does a very inadequate job (i.e. it "it does what it is meant to do" but not what many people "need it to do") and is designed in such a way that *required* functionality can't be added in a backwards compatible way.
That is not "good code" (by my reckoning).
As such, optparse needs to change (assuming that the stdlib *should* be "good code"). There are requirements (feature requests at least, possibly even bugs) which need addressing.
If no maintainer can be found to do this, then optparse is de facto dead and unmaintained.(Laura's B-2). No-one has made a statement about what should be done with B-2 code in the stdlib, but I can see good arguments for allowing the possibility of dropping it in favour of a replacement library.
If someone wants to argue that optparse is class "C" (ie, it is "finished" and "complete") then that's a different matter. Requests for optparse to support required arguments, or to better support user extension, would then be closed "won't fix - this is by design". And in that case, it *is* more or less by definition "good code" - it fulfills its aims, it just doesn't aim to do what Michael states many people "need it to do" above. (Personally, I don't see that code can be described as "good" if it doesn't aim to do what people need, but maybe someone wants to argue this).
Please note that adding functionality to such class "C" module is still allowed - provided it doesn't break anything. This has been done with optparse and getopt a few times already and is common practice with other such modules as well. In Laura's particular case, there does appear to be an easy solution which adds just that one feature: http://code.activestate.com/recipes/573441/ Things do get problematic if you want to approach a problem from a whole new angle, e.g. say you want to have XML DOM parsing instead of SAX parsing. In such a case, adding a whole new module would be better. Even though you're still parsing XML in both cases, the new module would provide a new method to do so. Much like the urllib2 provides a new and different way to handle URL fetching compared to urllib. There's also a third case: If a module cannot be updated or extended to support a major new feature mandated by the Python language, such as Unicode support, then there is little choice other than to replace it with a new module. This has happened with the pcre module that used to drive the re module - there was no way to get Unicode into pcre. The change was not really noticeable to the users, though, since the new module implemented the same API (and extended it). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
M.-A. Lemburg wrote:
[snip...] Please note that adding functionality to such class "C" module is still allowed - provided it doesn't break anything. This has been done with optparse and getopt a few times already and is common practice with other such modules as well.
In Laura's particular case, there does appear to be an easy solution which adds just that one feature:
http://code.activestate.com/recipes/573441/
Things do get problematic if you want to approach a problem from a whole new angle, e.g. say you want to have XML DOM parsing instead of SAX parsing.
In such a case, adding a whole new module would be better. Even though you're still parsing XML in both cases, the new module would provide a new method to do so. Much like the urllib2 provides a new and different way to handle URL fetching compared to urllib.
There's also a third case: If a module cannot be updated or extended to support a major new feature mandated by the Python language, such as Unicode support, then there is little choice other than to replace it with a new module.
This has happened with the pcre module that used to drive the re module - there was no way to get Unicode into pcre. The change was not really noticeable to the users, though, since the new module implemented the same API (and extended it).
Modules are also deprecated wholesale where their functionality is replaced by an alternative API. md5 -> hashlib mimewriter -> email This is already a normal part of the evolution of the Python standard library. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
Michael Foord wrote:
M.-A. Lemburg wrote:
[snip...] Please note that adding functionality to such class "C" module is still allowed - provided it doesn't break anything. This has been done with optparse and getopt a few times already and is common practice with other such modules as well.
In Laura's particular case, there does appear to be an easy solution which adds just that one feature:
http://code.activestate.com/recipes/573441/
Things do get problematic if you want to approach a problem from a whole new angle, e.g. say you want to have XML DOM parsing instead of SAX parsing.
In such a case, adding a whole new module would be better. Even though you're still parsing XML in both cases, the new module would provide a new method to do so. Much like the urllib2 provides a new and different way to handle URL fetching compared to urllib.
There's also a third case: If a module cannot be updated or extended to support a major new feature mandated by the Python language, such as Unicode support, then there is little choice other than to replace it with a new module.
This has happened with the pcre module that used to drive the re module - there was no way to get Unicode into pcre. The change was not really noticeable to the users, though, since the new module implemented the same API (and extended it).
Modules are also deprecated wholesale where their functionality is replaced by an alternative API.
md5 -> hashlib mimewriter -> email
This is already a normal part of the evolution of the Python standard library.
And that's perfectly ok. If the change is a single import statement, then I don't have a problem with that. I also don't have a problem with having a module called optparse, which, under the hood, uses argparse to provide the optparse API. I do have a problem with having to revisit the design of all scripts using a deprecated module in order to adapt it to some new, apparently deemed better, stdlib module, without any benefit, just in order to get the implementation or script working again. That's wasted time, really. And given that some modules are in wide-spread use that scales up wasting the time of thousands of other programmers out there. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
M.-A. Lemburg wrote:
Michael Foord wrote:
M.-A. Lemburg wrote:
[snip...] Please note that adding functionality to such class "C" module is still allowed - provided it doesn't break anything. This has been done with optparse and getopt a few times already and is common practice with other such modules as well.
In Laura's particular case, there does appear to be an easy solution which adds just that one feature:
http://code.activestate.com/recipes/573441/
Things do get problematic if you want to approach a problem from a whole new angle, e.g. say you want to have XML DOM parsing instead of SAX parsing.
In such a case, adding a whole new module would be better. Even though you're still parsing XML in both cases, the new module would provide a new method to do so. Much like the urllib2 provides a new and different way to handle URL fetching compared to urllib.
There's also a third case: If a module cannot be updated or extended to support a major new feature mandated by the Python language, such as Unicode support, then there is little choice other than to replace it with a new module.
This has happened with the pcre module that used to drive the re module - there was no way to get Unicode into pcre. The change was not really noticeable to the users, though, since the new module implemented the same API (and extended it).
Modules are also deprecated wholesale where their functionality is replaced by an alternative API.
md5 -> hashlib mimewriter -> email
This is already a normal part of the evolution of the Python standard library.
And that's perfectly ok.
If the change is a single import statement, then I don't have a problem with that.
For md5 the API basically moved (although md5.new became hashlib.md5). For MimeWriter there were (what looks like from a relatively casual look) fairly big API changes as well - even if they were only name changes (which is substantially similar to the requirements for moving from optparse to argparse). Michael
I also don't have a problem with having a module called optparse, which, under the hood, uses argparse to provide the optparse API.
I do have a problem with having to revisit the design of all scripts using a deprecated module in order to adapt it to some new, apparently deemed better, stdlib module, without any benefit, just in order to get the implementation or script working again.
That's wasted time, really. And given that some modules are in wide-spread use that scales up wasting the time of thousands of other programmers out there.
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
Michael Foord wrote:
M.-A. Lemburg wrote:
Michael Foord wrote:
Modules are also deprecated wholesale where their functionality is replaced by an alternative API.
md5 -> hashlib mimewriter -> email
This is already a normal part of the evolution of the Python standard library.
And that's perfectly ok.
If the change is a single import statement, then I don't have a problem with that.
For md5 the API basically moved (although md5.new became hashlib.md5).
Right - you only have to write a line or two to support both ways in your code.
For MimeWriter there were (what looks like from a relatively casual look) fairly big API changes as well - even if they were only name changes (which is substantially similar to the requirements for moving from optparse to argparse).
True, but it's fairly easy writing a compatibility module which does what MimeWriter did in terms of the email package. I wonder why that wasn't added to the email package - I would certainly have complained, but I've never used MimeWriter myself and didn't notice the deprecation at the time. Here's an example of migrating from MimeWriter to the email package: http://thomas.apestaart.org/moap/trac/changeset/401/trunk/moap/util/mail.py Note that the MimeWriter module still exists in Python 2.7: """ This module is present only to maintain backward compatibility. """ and that's good. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
2009/9/15 M.-A. Lemburg <mal@egenix.com>:
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point.
[Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.]
I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate.
Yes, I like both the summary, and the proposal (that standard library code be tagged with details like its status and its maintainer). I was in the "stdlib needs to evolve" camp, but this has clarified the other side of the argument, and changed my mind. I'm still in favour of new modules being added to the stdlib, and existing modules being updated, but I support the idea of stage C (dead as a doornail/complete, proven, stable) modules being retained indefinitely. I'm not sure what the implications of this position would be in the case of argparse vs optparse (optparse doesn't seem to be stage C, so maybe removing it in favour of argparse is an option) but I like the fact that this proposal gives us terminology on which we can base the discussion. Paul.
On Tue, Sep 15, 2009 at 12:16 PM, Paul Moore <p.f.moore@gmail.com> wrote:
2009/9/15 M.-A. Lemburg <mal@egenix.com>:
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point.
[Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.]
I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate.
Yes, I like both the summary, and the proposal (that standard library code be tagged with details like its status and its maintainer).
I was in the "stdlib needs to evolve" camp, but this has clarified the other side of the argument, and changed my mind.
I'm still in favour of new modules being added to the stdlib, and existing modules being updated, but I support the idea of stage C (dead as a doornail/complete, proven, stable) modules being retained indefinitely. I'm not sure what the implications of this position would be in the case of argparse vs optparse (optparse doesn't seem to be stage C, so maybe removing it in favour of argparse is an option) but I like the fact that this proposal gives us terminology on which we can base the discussion.
Paul.
There is no, no such thing as a "dead/complete" module. It does not exist. Any time there is a grammar change, a new reserved keyword, or some other functionality change a "dead" module comes back to life and has to be maintained. Can we please not treat "dead/complete" modules as if they have no maintenance burden, or drag down the code base? The reason I avoided that terminology in the first place is that there is no such thing as code with zero cost. jesse
Jesse Noller wrote:
On Tue, Sep 15, 2009 at 12:16 PM, Paul Moore <p.f.moore@gmail.com> wrote:
2009/9/15 M.-A. Lemburg <mal@egenix.com>:
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point.
[Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.]
I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate.
Yes, I like both the summary, and the proposal (that standard library code be tagged with details like its status and its maintainer).
I was in the "stdlib needs to evolve" camp, but this has clarified the other side of the argument, and changed my mind.
I'm still in favour of new modules being added to the stdlib, and existing modules being updated, but I support the idea of stage C (dead as a doornail/complete, proven, stable) modules being retained indefinitely. I'm not sure what the implications of this position would be in the case of argparse vs optparse (optparse doesn't seem to be stage C, so maybe removing it in favour of argparse is an option) but I like the fact that this proposal gives us terminology on which we can base the discussion.
Paul.
There is no, no such thing as a "dead/complete" module. It does not exist. Any time there is a grammar change, a new reserved keyword, or some other functionality change a "dead" module comes back to life and has to be maintained.
Can we please not treat "dead/complete" modules as if they have no maintenance burden, or drag down the code base? The reason I avoided that terminology in the first place is that there is no such thing as code with zero cost.
We're not treating them like that. All along we said, there is /very little/ maintenance needed. Besides, changes such as keyword fixes, grammar changes, style changes, etc. get applied to all stdlib modules, so these fixes don't really count as module-specific maintenance. Most of these fixes are done via a script or grep/sed anyway, so the cost per module is very small. You can have a look at the getopt SVN log to get an impression of just how much effort it takes to keep that module running. These are all changes applied to the module over a period of 7 years: ------------------------------------------------------------------------ r67572 | georg.brandl | 2008-12-05 10:23:14 +0100 (Fri, 05 Dec 2008) | 2 lines #4458: recognize "-" as an argument, not a malformed option in gnu_getopt(). ------------------------------------------------------------------------ r31261 | akuchling | 2003-02-06 20:52:56 +0100 (Thu, 06 Feb 2003) | 4 lines A few naughty external scripts do 'raise getopt.error, "blah"', and now crash because two arguments are expected. Add a default value to keep those scripts running. ------------------------------------------------------------------------ r27929 | loewis | 2002-08-04 19:22:59 +0200 (Sun, 04 Aug 2002) | 2 lines Add encoding declaration. ------------------------------------------------------------------------ r27780 | jackjansen | 2002-07-26 13:34:49 +0200 (Fri, 26 Jul 2002) | 2 lines Use os.environ.get() in stead of os.getenv() (which is platform-dependent). ------------------------------------------------------------------------ r27645 | tim_one | 2002-07-16 23:35:23 +0200 (Tue, 16 Jul 2002) | 2 lines Whitespace normalization. ------------------------------------------------------------------------ r27095 | montanaro | 2002-06-07 05:26:43 +0200 (Fri, 07 Jun 2002) | 2 lines gnu_getopt should be exported in __all__ ------------------------------------------------------------------------ r27077 | loewis | 2002-06-06 20:14:50 +0200 (Thu, 06 Jun 2002) | 2 lines Use isinstance for the type check, use booleans. ------------------------------------------------------------------------ r27068 | loewis | 2002-06-06 12:58:36 +0200 (Thu, 06 Jun 2002) | 2 lines Patch 473512: add GNU style scanning as gnu_getopt. ------------------------------------------------------------------------ r26191 | tim_one | 2002-04-05 00:55:58 +0200 (Fri, 05 Apr 2002) | 2 lines Convert a pile of obvious "yes/no" functions to return bool. ------------------------------------------------------------------------ r24680 | fdrake | 2001-12-12 07:20:34 +0100 (Wed, 12 Dec 2001) | 3 lines Wrapped a long line. Converted to use "".startswith() to avoid slicing (& temp string creation). ------------------------------------------------------------------------ r18934 | montanaro | 2001-01-21 00:34:12 +0100 (Sun, 21 Jan 2001) | 2 lines more __all__ updates ... The story is similar for optparse, only that the low maintenance mode has started in 2006. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
M.-A. Lemburg wrote:
Jesse Noller wrote:
On Tue, Sep 15, 2009 at 12:16 PM, Paul Moore <p.f.moore@gmail.com> wrote:
2009/9/15 M.-A. Lemburg <mal@egenix.com>:
Laura Creighton wrote:
So what do you think of this proposal?
Good write-up and very much to the point.
[Executive Summary: Code that hardly needs any changes, because it does what it's meant to do, is good code, not bad code. And it causes only minimal maintenance effort, so it's actually something core developer should welcome rather than fight against.]
I'd only change the tag "dead-as-a-doornail" to "complete, proven and stable". Sounds more accurate.
Yes, I like both the summary, and the proposal (that standard library code be tagged with details like its status and its maintainer).
I was in the "stdlib needs to evolve" camp, but this has clarified the other side of the argument, and changed my mind.
I'm still in favour of new modules being added to the stdlib, and existing modules being updated, but I support the idea of stage C (dead as a doornail/complete, proven, stable) modules being retained indefinitely. I'm not sure what the implications of this position would be in the case of argparse vs optparse (optparse doesn't seem to be stage C, so maybe removing it in favour of argparse is an option) but I like the fact that this proposal gives us terminology on which we can base the discussion.
Paul.
There is no, no such thing as a "dead/complete" module. It does not exist. Any time there is a grammar change, a new reserved keyword, or some other functionality change a "dead" module comes back to life and has to be maintained.
Can we please not treat "dead/complete" modules as if they have no maintenance burden, or drag down the code base? The reason I avoided that terminology in the first place is that there is no such thing as code with zero cost.
We're not treating them like that. All along we said, there is /very little/ maintenance needed.
Besides, changes such as keyword fixes, grammar changes, style changes, etc. get applied to all stdlib modules, so these fixes don't really count as module-specific maintenance. Most of these fixes are done via a script or grep/sed anyway, so the cost per module is very small.
You can have a look at the getopt SVN log to get an impression of just how much effort it takes to keep that module running.
These are all changes applied to the module over a period of 7 years:
This doesn't begin to cover the whole cost of keeping a library and its tests in Python. There are all the closed issues that someone has had to look into and respond to. Every time a developer runs all of the Python tests he pays some cost for every test of every module. Every time someone packages, distributes or downloads Python they pay some cost for every byte in Python. Every time someone translates the documentation, or updates the documentation (which Georg did recently for *every* module in the standard library) they pay a cost for every language feature and module they touch - or have to make a conscious decision not to touch. There is also a cost in keeping bad modules in the library (something that has already been touched on) in user frustration. There is of course a cost in removing modules too - documentation and tutorials go out of date and need changing. There is definitely an inertia in favour of not removing modules - but there is also a hidden cost in keeping them. All of this needs to be weighed (carefully). Michael
------------------------------------------------------------------------ r67572 | georg.brandl | 2008-12-05 10:23:14 +0100 (Fri, 05 Dec 2008) | 2 lines
#4458: recognize "-" as an argument, not a malformed option in gnu_getopt().
------------------------------------------------------------------------ r31261 | akuchling | 2003-02-06 20:52:56 +0100 (Thu, 06 Feb 2003) | 4 lines
A few naughty external scripts do 'raise getopt.error, "blah"', and now crash because two arguments are expected. Add a default value to keep those scripts running.
------------------------------------------------------------------------ r27929 | loewis | 2002-08-04 19:22:59 +0200 (Sun, 04 Aug 2002) | 2 lines
Add encoding declaration.
------------------------------------------------------------------------ r27780 | jackjansen | 2002-07-26 13:34:49 +0200 (Fri, 26 Jul 2002) | 2 lines
Use os.environ.get() in stead of os.getenv() (which is platform-dependent).
------------------------------------------------------------------------ r27645 | tim_one | 2002-07-16 23:35:23 +0200 (Tue, 16 Jul 2002) | 2 lines
Whitespace normalization.
------------------------------------------------------------------------ r27095 | montanaro | 2002-06-07 05:26:43 +0200 (Fri, 07 Jun 2002) | 2 lines
gnu_getopt should be exported in __all__
------------------------------------------------------------------------ r27077 | loewis | 2002-06-06 20:14:50 +0200 (Thu, 06 Jun 2002) | 2 lines
Use isinstance for the type check, use booleans.
------------------------------------------------------------------------ r27068 | loewis | 2002-06-06 12:58:36 +0200 (Thu, 06 Jun 2002) | 2 lines
Patch 473512: add GNU style scanning as gnu_getopt.
------------------------------------------------------------------------ r26191 | tim_one | 2002-04-05 00:55:58 +0200 (Fri, 05 Apr 2002) | 2 lines
Convert a pile of obvious "yes/no" functions to return bool.
------------------------------------------------------------------------ r24680 | fdrake | 2001-12-12 07:20:34 +0100 (Wed, 12 Dec 2001) | 3 lines
Wrapped a long line. Converted to use "".startswith() to avoid slicing (& temp string creation).
------------------------------------------------------------------------ r18934 | montanaro | 2001-01-21 00:34:12 +0100 (Sun, 21 Jan 2001) | 2 lines
more __all__ updates
...
The story is similar for optparse, only that the low maintenance mode has started in 2006.
-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog
Michael Foord wrote:
M.-A. Lemburg wrote:
Can we please not treat "dead/complete" modules as if they have no maintenance burden, or drag down the code base? The reason I avoided that terminology in the first place is that there is no such thing as code with zero cost.
We're not treating them like that. All along we said, there is /very little/ maintenance needed.
Besides, changes such as keyword fixes, grammar changes, style changes, etc. get applied to all stdlib modules, so these fixes don't really count as module-specific maintenance. Most of these fixes are done via a script or grep/sed anyway, so the cost per module is very small.
You can have a look at the getopt SVN log to get an impression of just how much effort it takes to keep that module running.
These are all changes applied to the module over a period of 7 years:
This doesn't begin to cover the whole cost of keeping a library and its tests in Python.
It was meant a proof for the code being mature and causing low maintenance costs.
There are all the closed issues that someone has had to look into and respond to. Every time a developer runs all of the Python tests he pays some cost for every test of every module. Every time someone packages, distributes or downloads Python they pay some cost for every byte in Python. Every time someone translates the documentation, or updates the documentation (which Georg did recently for *every* module in the standard library) they pay a cost for every language feature and module they touch - or have to make a conscious decision not to touch.
Right, I didn't say there were no costs, but then how does the above time compare to e.g. fixing two nasty bugs in a newly adopted module ? You can easily spend a day or two trying to track down such bugs. Certainly more than you spend on doing the things you mentioned above for a module that doesn't have all that many issues.
There is also a cost in keeping bad modules in the library (something that has already been touched on) in user frustration.
Nobody forces a user to use a "bad" module (for whatever meaning the user associates with "bad"). That's what so great about Python: there are a gazillion 3rd party modules out there waiting to get used.
There is of course a cost in removing modules too - documentation and tutorials go out of date and need changing. There is definitely an inertia in favour of not removing modules - but there is also a hidden cost in keeping them. All of this needs to be weighed (carefully).
Sure. What I'm trying to say is that keeping a module in the stdlib costs less than removing it - for everyone. I've been maintaining our eGenix mx Series for more than a decade now, so I do know a little about such costs, where to expect them and where not. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
Le mardi 15 septembre 2009 à 12:21 -0400, Jesse Noller a écrit :
Can we please not treat "dead/complete" modules as if they have no maintenance burden, or drag down the code base? The reason I avoided that terminology in the first place is that there is no such thing as code with zero cost.
Let's say "low maintenance", then. "Low" not necessarily meaning zero, of course. Regards Antoine.
On Tue, Sep 15, 2009 at 10:29 AM, Laura Creighton <lac@openend.se> wrote: [snip]
Indeed, right now, if you write code that parses options you are most likely doing one of 4 things:
a) using getopt b) using optparse c) using some third party module for parsing that is currently under development d) writing your own option parser in python
Now, for years I have been telling people that d) was by far the poorest way of doing things. Don't reinvent the wheel, and all that. But on the day that you yank getopt and optparse out of the library, you will have made this terrible advice to give my poor hospital clients. And you will have made all the time I spent ripping out hand-made option parsers and replacing them with getopt instead wasted time that I billed my clients for. Instead of giving them a robust solution that will require little or no maintainance, I have given them a zillion scripts, _all of which will suddenly break one day_. And since the pure python parsers that I never got around to converting will probably still be working, the people who did d) will get the last laugh.
This is incorrect. Code that runs correctly on Python x.y will not "suddenly break one day": no-one from python-dev is going to reach into your customers' systems and install some other version of Python behind your/their back, against their will. The code you have written will continue to work, indefinitely, until the customer decides to upgrade their version of Python. When that happens, they can choose to perform this migration correctly or incorrectly. Upgrading correctly involves testing (your code comes with a test suite, I assume) against the new version of Python, to make sure things work, before deploying to production. This is no different than upgrading versions of Postgres, gcc or Linux: it has risks, but gcc doesn't upgrade itself on its own. You choose when to do this, and you do so in a way that contains and mitigates the risk.
So -- real use case time -- the hospitals where I have done a lot of work have some really weird equipment. And using them costs real money, uses up real lab supplies, and conceivably can ruin a sample that you will find it inconvenient or impossible to replace.
There are all sorts of weird dependencies among the various options you can use to operate the devices. If you have specified option K, you may not also specify option M or N, and if you have specified option L, you must also specify option Q, or option R and option S.
Thus the whole exercise of writing a script to use the equipment becomes as matter of validating the options you selected are complete and non-contradictory, and then going out and exercising the hardware.
You can build a validating option parser by hand (option d) or using getopt (option a). You will find it difficult to the point of near impossibility to build one using optparse, because optparse specifically rejects the notion of 'required options' which is the meat-and-potoatoes part of this app. I found this out when optparse went into the standard library, and was touted at being superior to getopt.
I tried it, and tried to subclass it, and talked to its author about whether it could be changed to support my use case, and even volunteered to write code to change it, but was firmly told that optparse worked the way it did, on purpose, in order to prevent the sort of use that I wanted to make of it, and that patches to make that possible were entirely unwelcome.
Frankly, this sounds like an *excellent* reason to get rid of optparse and replace it with something more flexible. Steven Bethard has said that he originally tried adding the features of argparse to optparse, but found the code to be so poorly designed that it really couldn't be changed in any meaningful way. If the Python community is finding common argument-parsing scenarios that optparse doesn't support (such as what you outlined above), to the point where people are hand-coding argument parsers because that's easier than using optparse, then optparse is a failure and we should look for something that better serves the needs of developers like yourself.
At which point I go back to using getopt. There is no particular hard feelings about this -- I figure that the people who want to use optparse can use it, and getopt is here for the people who won't, or can't. But when later in time people suggested getting rid of getopt because 'it was old' and 'optparse was better' I realise, a long time when it was too late to do anything, that I should have been spearheading the 'I don't want optparse in the standard library' effort, on the grounds that it didn't support 'required arguments'. That fight might have become nasty. Far better to allow multiple ways of doing things.
I sympathize with your experience, but disagree with your conclusion. It doesn't sound like we have multiple ways of doing things at all: it seems we have several different argument parsing libraries that, despite starting from a common goal of "argument parsing", have implemented divergent functionalities with only a relatively small area of overlap. They actually do different things, and in different ways. This is a serious problem. If I've been happily using optparse in my project, and one day discover that I need required arguments, I have to switch to a totally different library? Libraries should be able to scale to meet their users' needs. This is what Jacob Kaplan-Moss was talking about in his recent PyCon Argentina/Brazil keynotes (http://jacobian.org/TO): as the user has more complex/specific needs, the library should be able to yield gracefully, either implementing the desired functionality itself or making it possible for the user to customize specific aspects of the library's behaviour without throwing away/rewriting the entire library.
As far as I can tell most software packages go through three stages: [snip stage descriptions] Now software in Stage A doesn't need maintenance so much as development in the first place. And software in stage B requires a lot of maintainance. But most software in stage C requires little or no maintenance, precisely because it is unchanging. So, if you decide to change how Exceptions are inherited, for instance, you may break a whole lot of Stage C: code, but fixing them is part of the general problem of 'fixing exceptions everywhere' not part of 'fixing getopt'.
Now I think that there is some confusion here between packages who are in Stage C: and packages who are in Stage B-2: around here. The B-2 packages are probably the core developers greatest headache. But I don't see the C packages as being troublesome at all. If you don't like them, it isn't because of the work that maintaining is costing you. It may be that hatred for the B-2's has become a general hatred of all packages with no maintainers, which is an understandable mistake. But from reading this list I get the distinct impression that some people just hate C:s _precisely because they are old and unchanging_, and would continue to hate them for that reason even if I was in some way able to guarantee that they would never need any maintenance ever again. These people are condemning the packages I love best for the reason they are the packages I love best. And that is the attitude I would like to change.
Speaking as a core developer, I disagree. The problem with unmaintained (in your terms, B-2) or intentionally-frozen (C-*) packages is that they make it difficult for us to evolve and adapt Python the language and Python the standard library: if no-one is willing/available to update the code to account for language/library changes, the frozen package will become pinned to a specific known-good version (or range of versions) of Python. Over time, that version of Python will become uncommon (as distros phase it out) and unsupported (as python-dev end-of-lifes it). This is a problem for users of that package, who may wish to use newer version of Python for performance or bug-fix reasons, and it is also a problem for python-dev, since those frozen packages create inertia.
It boils down to a matter of trust. My customers trust me to not give them ticking time bombs that will all stop working one day, and I trust you not to go about gratuitously removing perfectly working code that is quietly sitting there, not needing any changes, and not bothering anybody. When you break that contract with me, my customers suffer, I suffer, and the people who said 'You shouldn't have coded it in Python in the first place, but picked a mature language like Java' are completely vindicated.
The systems you have written for your customers are not autonomous agents; presumably, you have not written code like "if today.year == 2011: sudo apt-get upgrade python" into these systems that would change the version of Python running without anyone asking. Human beings control these upgrades. If the human being performs the upgrade blindly, without taking appropriate risk mitigation steps, there's very little that we can do to protect them. You left out a key element in the chain of trust above: presumably, you trust your customers not to violate the minimum requirements you've set out for the software you've written for them. If you say "this software requires 2GB of RAM" and the customer later decides to try running the machines with only 256MB to save money instead, that's not your fault: it's theirs. Likewise, if you say "this software runs on Python 2.5" and they blindly install Python 3.1 instead, that's not your fault: it's theirs. As to the matter of Java's deprecation policy, I don't regard it as "mature": I regard it as a sign of different requirements. Because you can't know what browser version or JRE version a user's desktop is running, stability is paramount for Java; "write once, run anywhere" is not free, it has its costs. As Frank Wierzbicki has said (either in this thread or the other one about argparse), the inability to ever remove code from the libraries makes life difficult for Java's developers -- who have to maintain this code -- as well as for everyday Java engineers, who have to learn to navigate this maze of deprecated vs non-deprecated solutions to the same problem. Java shops generally end up with a list of Approved Java Classes so that new hires and old pros alike don't get tripped up. In Python, we don't have the luxury of a paid staff to work on our libraries, to maintain the crufty, fragile, we'd-like-to-get-rid-of-you-but-maybe-someone's-using-you-we-don't-really-know modules. We rely almost exclusively on volunteer contributions, and it's tough to find volunteers to work on crap code. It's one thing to choose not to change something; it's another thing entirely not to be able to change something, to have your hands tied by code you can't see and no-one will change. As Python development slows, as stability gets confused for permanence and stasis, I predict it will be harder to attract enthusiastic, eager contributors. After all, who wants to work on something you're not allowed to modify? To speak more personally, and specifically to the issue of getopt/optparse vs argparse: at Google, I'm part of the Python readability team, which helps train the large numbers of Python developers that the company produces. Part of this job involves conducting detailed code reviews for new Python programmers, explaining both Google style and idiomatic Python code generally, suggesting library A over hand-written solution B. I am, frankly, embarrassed whenever I have to explain the difference between getopt and optparse, urllib and urllib2, popen2 vs os.popen* vs subprocess, string.* vs str.*, etc. I cannot imagine how embarrassed I will be when I have to explain why the standard library includes getopt, optparse and argparse. Collin Winter
Le mardi 15 septembre 2009 à 14:38 +0000, Collin Winter a écrit :
This is no different than upgrading versions of Postgres, gcc or Linux: it has risks, but gcc doesn't upgrade itself on its own.
But there *is* a difference between unforeseen bugs (which are an unavoidable pitfall of software development), and deliberate removal of widely used features. Your reasoning is like saying: there will be unforeseen bugs anyway, so we can just create deliberate bugs for the sake of it.
Frankly, this sounds like an *excellent* reason to get rid of optparse and replace it with something more flexible.
It *would* have been an excellent reason to choose argparse over optparse in the first place. But since optparse is already in the stdlib, we have users to care about.
This is a problem for users of that package, who may wish to use newer version of Python for performance or bug-fix reasons,
This is a reason for keeping that package in the stdlib, not for removing it.
and it is also a problem for python-dev, since those frozen packages create inertia.
I'm not sure what inertia you're talking about. The presence of the Lib/optparse.py file does not look like a deterrent to contributing to any other part of the interpreter or the stdlib. Lib/optparse.py itself doesn't seem to receive a lot of checkins, and most are cosmetic. There are very few open bugs concerning optparse in bugs.python.org, and most seem normal/low priority. From this I gather that: 1) optparse is low maintenance (requires few checkins) 2) optparse is low annoyance (doesn't clutter the bug tracker) Taking optparse as an example defeats your point more than it helps it, IMO. You should choose a bug-ridden module with an awful API, not something perfectly decent which fits lots of everyday use cases.
On Tue, Sep 15, 2009 at 3:49 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 à 14:38 +0000, Collin Winter a écrit :
This is no different than upgrading versions of Postgres, gcc or Linux: it has risks, but gcc doesn't upgrade itself on its own.
But there *is* a difference between unforeseen bugs (which are an unavoidable pitfall of software development), and deliberate removal of widely used features.
Your reasoning is like saying: there will be unforeseen bugs anyway, so we can just create deliberate bugs for the sake of it.
I was specifically responding to the idea that deprecation/removal creates "ticking time bombs". Willful deprecation is not a bug.
Frankly, this sounds like an *excellent* reason to get rid of optparse and replace it with something more flexible.
It *would* have been an excellent reason to choose argparse over optparse in the first place. But since optparse is already in the stdlib, we have users to care about.
This is a problem for users of that package, who may wish to use newer version of Python for performance or bug-fix reasons,
This is a reason for keeping that package in the stdlib, not for removing it.
and it is also a problem for python-dev, since those frozen packages create inertia.
I'm not sure what inertia you're talking about. The presence of the Lib/optparse.py file does not look like a deterrent to contributing to any other part of the interpreter or the stdlib.
Sorry, I meant frozen/unmaintained packages that use optparse, rather than optparse itself.
Lib/optparse.py itself doesn't seem to receive a lot of checkins, and most are cosmetic. There are very few open bugs concerning optparse in bugs.python.org, and most seem normal/low priority. From this I gather that: 1) optparse is low maintenance (requires few checkins) 2) optparse is low annoyance (doesn't clutter the bug tracker)
Taking optparse as an example defeats your point more than it helps it, IMO. You should choose a bug-ridden module with an awful API, not something perfectly decent which fits lots of everyday use cases.
Did you read what Laura wrote about her experience with optparse? """ So -- real use case time -- the hospitals where I have done a lot of work have some really weird equipment. And using them costs real money, uses up real lab supplies, and conceivably can ruin a sample that you will find it inconvenient or impossible to replace. There are all sorts of weird dependencies among the various options you can use to operate the devices. If you have specified option K, you may not also specify option M or N, and if you have specified option L, you must also specify option Q, or option R and option S. Thus the whole exercise of writing a script to use the equipment becomes as matter of validating the options you selected are complete and non-contradictory, and then going out and exercising the hardware. You can build a validating option parser by hand (option d) or using getopt (option a). You will find it difficult to the point of near impossibility to build one using optparse, because optparse specifically rejects the notion of 'required options' which is the meat-and-potoatoes part of this app. I found this out when optparse went into the standard library, and was touted at being superior to getopt. I tried it, and tried to subclass it, and talked to its author about whether it could be changed to support my use case, and even volunteered to write code to change it, but was firmly told that optparse worked the way it did, on purpose, in order to prevent the sort of use that I wanted to make of it, and that patches to make that possible were entirely unwelcome. """ Did you read what Steven Bethard wrote about his experience with optparse? """ On Thu, Sep 10, 2009 at 3:55 PM, Collin Winter <collinw@gmail.com> 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". """ or """ On Sun, Sep 13, 2009 at 12:31 AM, Ronald Oussoren <ronaldoussoren@mac.com> 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=<callable> 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. """ It's also worth noting that optparse continues to have bugs filed against it, so it is not perfect or low-maintenance in that respect: http://bugs.python.org/issue2931 is an interesting example. Collin Winter
Le mardi 15 septembre 2009 à 12:03 -0400, Collin Winter a écrit :
Did you read what Laura wrote about her experience with optparse? [...]
Sure I did. These are still fringe use cases compared to the common uses of an option parser. Perhaps argparse has a couple of nifty features that make things slightly easier in the common cases, but the difference doesn't seem earth-shattering to me. The point is, optparse does useful things and it does them reasonably well. You can't deny that, and talking about how that other library does many other things is not a satisfying answer to the people whose code you're gonna break.
It's also worth noting that optparse continues to have bugs filed against it, so it is not perfect or low-maintenance in that respect: http://bugs.python.org/issue2931 is an interesting example.
Well, of course it has bugs filed against it (which software hasn't?). The point is that there are few of them. And, yes, being more unicode-compliant would be nice (although the bug should be retried on py3k, because this whole discussion probably targets 3.x anyway, not 2.x).
Antoine Pitrou schrieb:
Le mardi 15 septembre 2009 à 12:03 -0400, Collin Winter a écrit :
Did you read what Laura wrote about her experience with optparse? [...]
Sure I did. These are still fringe use cases compared to the common uses of an option parser. Perhaps argparse has a couple of nifty features that make things slightly easier in the common cases, but the difference doesn't seem earth-shattering to me.
The point is, optparse does useful things and it does them reasonably well. You can't deny that, and talking about how that other library does many other things is not a satisfying answer to the people whose code you're gonna break.
Of course it does them reasonably well. But for most of these "common" use cases you talk about above, a replacement library will be able to offer the same or a very similar API, so the breakage is not much worse than with md5/hashlib.
It's also worth noting that optparse continues to have bugs filed against it, so it is not perfect or low-maintenance in that respect: http://bugs.python.org/issue2931 is an interesting example.
Well, of course it has bugs filed against it (which software hasn't?). The point is that there are few of them. And, yes, being more unicode-compliant would be nice (although the bug should be retried on py3k, because this whole discussion probably targets 3.x anyway, not 2.x).
I wouldn't say it has few bugs filed against it; sadly I have no hard data, but since I read each new tracker item (or at least the title), I would say that there are many modules that have fewer bugs filed than optparse. Of course, this also is correlated with the module's size (it's currently the 12th largest single module in trunk/Lib). Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
Le mardi 15 septembre 2009 à 21:51 +0200, Georg Brandl a écrit :
Of course it does them reasonably well. But for most of these "common" use cases you talk about above, a replacement library will be able to offer the same or a very similar API, so the breakage is not much worse than with md5/hashlib.
Well I do think that md5 shouldn't have been deprecated in 2.x. AFAIU, it was easy to continue supporting it (by creating a simple stub); annoying users wasn't worth what we gained in maintenance, IMO. But regardless, this is not the same situation. Migrating from md5 to hashlib is simply changing an import line and a module name. Migrating from optparse to argparse involves an API change.
I wouldn't say it has few bugs filed against it; sadly I have no hard data, but since I read each new tracker item (or at least the title), I would say that there are many modules that have fewer bugs filed than optparse.
Of course, this also is correlated with the module's size (it's currently the 12th largest single module in trunk/Lib).
It is also correlated with the module's usefulness. Parsing command line options is certainly much more common than, say, normalizing unicode strings or adding fractions together. Regards Antoine.
Antoine Pitrou schrieb:
Le mardi 15 septembre 2009 à 21:51 +0200, Georg Brandl a écrit :
Of course it does them reasonably well. But for most of these "common" use cases you talk about above, a replacement library will be able to offer the same or a very similar API, so the breakage is not much worse than with md5/hashlib.
Well I do think that md5 shouldn't have been deprecated in 2.x. AFAIU, it was easy to continue supporting it (by creating a simple stub); annoying users wasn't worth what we gained in maintenance, IMO.
But regardless, this is not the same situation. Migrating from md5 to hashlib is simply changing an import line and a module name. Migrating from optparse to argparse involves an API change.
Maybe. (I don't know argparse.) But I can imagine that providing a simple compatibility API that supports creating OptionParsers and calling add_option() and parse() on them would be easy if not trivial, and that's what most users of optparse use.
I wouldn't say it has few bugs filed against it; sadly I have no hard data, but since I read each new tracker item (or at least the title), I would say that there are many modules that have fewer bugs filed than optparse.
Of course, this also is correlated with the module's size (it's currently the 12th largest single module in trunk/Lib).
It is also correlated with the module's usefulness. Parsing command line options is certainly much more common than, say, normalizing unicode strings or adding fractions together.
This is true, but it doesn't make the bugs less or less important, but potentially even more important. Endly, that results either in more work or in dissatisfied users. cheers, Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
On Tue, Sep 15, 2009 at 07:38, Collin Winter <collinw@gmail.com> wrote:
On Tue, Sep 15, 2009 at 10:29 AM, Laura Creighton <lac@openend.se> wrote: [snip]
As far as I can tell most software packages go through three stages: [snip stage descriptions] Now software in Stage A doesn't need maintenance so much as development in the first place. And software in stage B requires a lot of maintainance. But most software in stage C requires little or no maintenance, precisely because it is unchanging. So, if you decide to change how Exceptions are inherited, for instance, you may break a whole lot of Stage C: code, but fixing them is part of the general problem of 'fixing exceptions everywhere' not part of 'fixing getopt'.
Now I think that there is some confusion here between packages who are in Stage C: and packages who are in Stage B-2: around here. The B-2 packages are probably the core developers greatest headache. But I don't see the C packages as being troublesome at all. If you don't like them, it isn't because of the work that maintaining is costing you. It may be that hatred for the B-2's has become a general hatred of all packages with no maintainers, which is an understandable mistake. But from reading this list I get the distinct impression that some people just hate C:s _precisely because they are old and unchanging_, and would continue to hate them for that reason even if I was in some way able to guarantee that they would never need any maintenance ever again. These people are condemning the packages I love best for the reason they are the packages I love best. And that is the attitude I would like to change.
Speaking as a core developer, I disagree. The problem with unmaintained (in your terms, B-2) or intentionally-frozen (C-*) packages is that they make it difficult for us to evolve and adapt Python the language and Python the standard library: if no-one is willing/available to update the code to account for language/library changes, the frozen package will become pinned to a specific known-good version (or range of versions) of Python. Over time, that version of Python will become uncommon (as distros phase it out) and unsupported (as python-dev end-of-lifes it). This is a problem for users of that package, who may wish to use newer version of Python for performance or bug-fix reasons, and it is also a problem for python-dev, since those frozen packages create inertia.
[snip]
It boils down to a matter of trust. My customers trust me to not give them ticking time bombs that will all stop working one day, and I trust you not to go about gratuitously removing perfectly working code that is quietly sitting there, not needing any changes, and not bothering anybody. When you break that contract with me, my customers suffer, I suffer, and the people who said 'You shouldn't have coded it in Python in the first place, but picked a mature language like Java' are completely vindicated.
The systems you have written for your customers are not autonomous agents; presumably, you have not written code like "if today.year == 2011: sudo apt-get upgrade python" into these systems that would change the version of Python running without anyone asking. Human beings control these upgrades. If the human being performs the upgrade blindly, without taking appropriate risk mitigation steps, there's very little that we can do to protect them. You left out a key element in the chain of trust above: presumably, you trust your customers not to violate the minimum requirements you've set out for the software you've written for them. If you say "this software requires 2GB of RAM" and the customer later decides to try running the machines with only 256MB to save money instead, that's not your fault: it's theirs. Likewise, if you say "this software runs on Python 2.5" and they blindly install Python 3.1 instead, that's not your fault: it's theirs.
As to the matter of Java's deprecation policy, I don't regard it as "mature": I regard it as a sign of different requirements. Because you can't know what browser version or JRE version a user's desktop is running, stability is paramount for Java; "write once, run anywhere" is not free, it has its costs. As Frank Wierzbicki has said (either in this thread or the other one about argparse), the inability to ever remove code from the libraries makes life difficult for Java's developers -- who have to maintain this code -- as well as for everyday Java engineers, who have to learn to navigate this maze of deprecated vs non-deprecated solutions to the same problem. Java shops generally end up with a list of Approved Java Classes so that new hires and old pros alike don't get tripped up.
In Python, we don't have the luxury of a paid staff to work on our libraries, to maintain the crufty, fragile, we'd-like-to-get-rid-of-you-but-maybe-someone's-using-you-we-don't-really-know modules. We rely almost exclusively on volunteer contributions, and it's tough to find volunteers to work on crap code. It's one thing to choose not to change something; it's another thing entirely not to be able to change something, to have your hands tied by code you can't see and no-one will change. As Python development slows, as stability gets confused for permanence and stasis, I predict it will be harder to attract enthusiastic, eager contributors. After all, who wants to work on something you're not allowed to modify?
To speak more personally, and specifically to the issue of getopt/optparse vs argparse: at Google, I'm part of the Python readability team, which helps train the large numbers of Python developers that the company produces. Part of this job involves conducting detailed code reviews for new Python programmers, explaining both Google style and idiomatic Python code generally, suggesting library A over hand-written solution B. I am, frankly, embarrassed whenever I have to explain the difference between getopt and optparse, urllib and urllib2, popen2 vs os.popen* vs subprocess, string.* vs str.*, etc. I cannot imagine how embarrassed I will be when I have to explain why the standard library includes getopt, optparse and argparse.
I agree with Collin in that we have to keep perspective on how this impacts active core contributors and potential future ones. Like all core developers I only have a small amount of free time in my life to spend working on Python. That means I have to prioritize what patches I review, what bugs I try to fix, etc., because frankly there are too many for me and all of the active contributors to look at (I could say how that is part of why I think the stdlib needs to slim down a little, but that can wait for a PEP proposing what to trim and why). So if I am browsing the issue tracker trying to help out, I can come across getopt and optparse issues. Now I can obviously work on those and fix bugs, but I also happen to know that argparse is out there, generally well received by the community, and has been requested for addition to the stdlib for years (the crowd was rather enthusiastic during Steven's lightning talk at PyCon 2010 about argparse). It's a little deflating to work on code that I know the community has deemed mediocre compared to something out in the wild. Why should I spend my time on getopt and optparse when I could try to get argparse into the stdlib and spend my precious free time on some code I know will ultimately serve the community better than the current code? Or how about code that slipped in years ago and has not held up well in terms of design? That's even worse because of the amount of time I have to burn trying to untangle some coding mess that we have inherited from Python's history. I don't want to feel like I am wasting my time when I work on Python stuff. And I am sure the other core developers don't either. And this is partially why we have modules that end up with a laundry list of bug reports and patches languishing in the issue tracker. Nor do I want Python's reputation tarnished, as Collin pointed out, by having old modules sitting there in the standard library. Which gives another reason why argparse is attractive; Steven is already a core developer and will keep argparse maintained, letting me slowly ignore getopt/optparse issues guilt-free while I work on other issues that actually bring me some form of joy. -Brett
Le mardi 15 septembre 2009 à 10:19 -0700, Brett Cannon a écrit :
(the crowd was rather enthusiastic during Steven's lightning talk at PyCon 2010 about argparse).
Is it a typo or a rhetorical trick? ;)
Nor do I want Python's reputation tarnished, as Collin pointed out, by having old modules sitting there in the standard library.
Python's reputation will certainly get tarnished, however, if widely-used modules get deprecated and removed. We will already get some damage with all of the py3k changes. No need to worsen our case, IMO. Regards Antoine. PS : Perhaps I'm the only one bothered by this, but it would be nice if people trimmed quoted messages a bit more. Having to scroll 3 pages before reading the actual reply is tedious.
On Tue, Sep 15, 2009 at 10:54, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 à 10:19 -0700, Brett Cannon a écrit :
(the crowd was rather enthusiastic during Steven's lightning talk at PyCon 2010 about argparse).
Is it a typo or a rhetorical trick? ;)
Typo. =) I meant 2009.
Nor do I want Python's reputation tarnished, as Collin pointed out, by having old modules sitting there in the standard library.
Python's reputation will certainly get tarnished, however, if widely-used modules get deprecated and removed. We will already get some damage with all of the py3k changes. No need to worsen our case, IMO.
I don't think slow deprecations will do that. This happened with md5/sha when we introduced hashlib and the Mercurial guys were the only ones I ever heard complain.
Regards
Antoine.
PS : Perhaps I'm the only one bothered by this, but it would be nice if people trimmed quoted messages a bit more. Having to scroll 3 pages before reading the actual reply is tedious.
Gmail color-codes so I simply scroll until I no longer see purple. -Brett
On Tue, 15 Sep 2009 at 11:21, Brett Cannon wrote:
On Tue, Sep 15, 2009 at 10:54, Antoine Pitrou <solipsis@pitrou.net> wrote:
PS : Perhaps I'm the only one bothered by this, but it would be nice if people trimmed quoted messages a bit more. Having to scroll 3 pages before reading the actual reply is tedious.
Gmail color-codes so I simply scroll until I no longer see purple.
My editor color codes, too, which helps, but I still find masses of quoted context tedious. --David
It has been mentioned here that some bugs languish in the tracker because there is no one willing to say "yes" or "no" to them. In at least some cases this may be because it is unclear who the best person is to ask for a decision when the participants in the issue don't feel qualified to decide. And in some cases, some of the people it may be unclear to may be the very people who _could_ decide...if only they knew that they were the closest thing to an expert on that module that we have. In a discussion on IRC we came up with a proposal for a simple tool that might help out in this situation. I would like to propose that we create a file, tentatively named MISC/maintainers.txt, that contains two tables: (1) a table of all the modules in the standard library and (2) a table of 'areas of expertise' (things like Unicode, arithmetic, etc). Table (2) would be the simpler, and would just list people who felt they had enough expertise in the given area to be willing to make judgement calls on relevant issues on request. Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors. An 'official maintainer' would be someone willing to take more-or-less full responsibility for a module (such as Jesse for Multiprocessing). Experts would be people who feel they have a good working knowledge of the module and would not be afraid to sign off on the advisability and quality of a feature/bug fix when there is a question. Contributors would be anyone else with a more than casual knowledge of the module, but who aren't comfortable with signing off on the advisability of non-trivial patches/feature requests. My rational for including the third category is to have a pool of people who can self-promote as needed. These people can decide that it is OK to make the decision once they see that there is no one willing to declare themselves an expert in that module. I unfortunately expect a non-trivial number of modules to fall into this category. The listing in the table would be by tracker id, to facilitate making people nosy on issues. The tracker id can be used to discover names and email addresses if those are needed instead. Obviously one problem would be keeping this up to date, since when someone stops contributing they are fairly likely to not remove their name from the list. This task could be handled by anyone who does issue triage: if a triage person notices a maintainer or expert who has not responded to a request for decision on an issue, they can try pinging the person directly, and if they still get no response, mark the person (or request that the person be marked, if the triage person is not a committer) as 'deprecated'(*) in the maintainers file. If this proposal or a modification of it is accepted I will volunteer to create the file and canvas python-dev for names. --David (*) I mean 'inactive' of course. :)
On Tue, Sep 15, 2009 at 6:38 PM, R. David Murray <rdmurray@bitdance.com> wrote:
It has been mentioned here that some bugs languish in the tracker because there is no one willing to say "yes" or "no" to them. In at least some cases this may be because it is unclear who the best person is to ask for a decision when the participants in the issue don't feel qualified to decide. And in some cases, some of the people it may be unclear to may be the very people who _could_ decide...if only they knew that they were the closest thing to an expert on that module that we have.
+1 I had started this as a googlesheet as part of a pycon talk, and was planning on an email later on asking for "owners".
In a discussion on IRC we came up with a proposal for a simple tool that might help out in this situation. I would like to propose that we create a file, tentatively named MISC/maintainers.txt, that contains two tables: (1) a table of all the modules in the standard library and (2) a table of 'areas of expertise' (things like Unicode, arithmetic, etc). Table (2) would be the simpler, and would just list people who felt they had enough expertise in the given area to be willing to make judgement calls on relevant issues on request.
Hmm, tables in a text file? I can see it, it's just always wacky. +1
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors. An 'official maintainer' would be someone willing to take more-or-less full responsibility for a module (such as Jesse for Multiprocessing). Experts would be people who feel they have a good working knowledge of the module and would not be afraid to sign off on the advisability and quality of a feature/bug fix when there is a question. Contributors would be anyone else with a more than casual knowledge of the module, but who aren't comfortable with signing off on the advisability of non-trivial patches/feature requests. My rational for including the third category is to have a pool of people who can self-promote as needed. These people can decide that it is OK to make the decision once they see that there is no one willing to declare themselves an expert in that module. I unfortunately expect a non-trivial number of modules to fall into this category.
+1, provided we can get good information into this, this could help out a lot. Can I ask that instead of just a misc file, we put this in the official documentation, in ReST format? I'd like to be able to point to all official-like. Not to mention, sphinx and ReST are the One True Way.
The listing in the table would be by tracker id, to facilitate making people nosy on issues. The tracker id can be used to discover names and email addresses if those are needed instead.
+1
Obviously one problem would be keeping this up to date, since when someone stops contributing they are fairly likely to not remove their name from the list. This task could be handled by anyone who does issue triage: if a triage person notices a maintainer or expert who has not responded to a request for decision on an issue, they can try pinging the person directly, and if they still get no response, mark the person (or request that the person be marked, if the triage person is not a committer) as 'deprecated'(*) in the maintainers file.
+1
If this proposal or a modification of it is accepted I will volunteer to create the file and canvas python-dev for names.
I accept it :)
2009/9/15 Jesse Noller <jnoller@gmail.com>:
On Tue, Sep 15, 2009 at 6:38 PM, R. David Murray <rdmurray@bitdance.com> wrote: Hmm, tables in a text file? I can see it, it's just always wacky.
emacs table mode!
+1
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors. An 'official maintainer' would be someone willing to take more-or-less full responsibility for a module (such as Jesse for Multiprocessing). Experts would be people who feel they have a good working knowledge of the module and would not be afraid to sign off on the advisability and quality of a feature/bug fix when there is a question. Contributors would be anyone else with a more than casual knowledge of the module, but who aren't comfortable with signing off on the advisability of non-trivial patches/feature requests. My rational for including the third category is to have a pool of people who can self-promote as needed. These people can decide that it is OK to make the decision once they see that there is no one willing to declare themselves an expert in that module. I unfortunately expect a non-trivial number of modules to fall into this category.
+1, provided we can get good information into this, this could help out a lot. Can I ask that instead of just a misc file, we put this in the official documentation, in ReST format? I'd like to be able to point to all official-like.
Why? It's not meant to be all official-like, just to help people triaging bugs or having questions about the code. I don't see how it would benefit the person trying to find out how to use module X in the official docs. -- Regards, Benjamin
On Tue, Sep 15, 2009 at 6:55 PM, Benjamin Peterson <benjamin@python.org> wrote:
2009/9/15 Jesse Noller <jnoller@gmail.com>:
On Tue, Sep 15, 2009 at 6:38 PM, R. David Murray <rdmurray@bitdance.com> wrote: Hmm, tables in a text file? I can see it, it's just always wacky.
emacs table mode!
while emacs might be the One True Editor, some of us are Unwashed Heathens who don't use it. So saying "emacs table mode" reads as "as useful as a beef jerky bikini" ;)
Why? It's not meant to be all official-like, just to help people triaging bugs or having questions about the code. I don't see how it would benefit the person trying to find out how to use module X in the official docs.
Having a table in the official docs at least gives people an idea who to +noisy on bugs. How many multiprocessing bugs have you had to reassign, or even *add* me to because people outside of our group don't know?
2009/9/15 Jesse Noller <jnoller@gmail.com>:
On Tue, Sep 15, 2009 at 6:55 PM, Benjamin Peterson <benjamin@python.org> wrote:
Why? It's not meant to be all official-like, just to help people triaging bugs or having questions about the code. I don't see how it would benefit the person trying to find out how to use module X in the official docs.
Having a table in the official docs at least gives people an idea who to +noisy on bugs. How many multiprocessing bugs have you had to reassign, or even *add* me to because people outside of our group don't know?
I see your point, but I think it could be better solved by a auto-nosy for the "Components" menu or the ability to tag issues. -- Regards, Benjamin
On Tue, Sep 15, 2009 at 7:03 PM, Benjamin Peterson <benjamin@python.org> wrote:
2009/9/15 Jesse Noller <jnoller@gmail.com>:
On Tue, Sep 15, 2009 at 6:55 PM, Benjamin Peterson <benjamin@python.org> wrote:
Why? It's not meant to be all official-like, just to help people triaging bugs or having questions about the code. I don't see how it would benefit the person trying to find out how to use module X in the official docs.
Having a table in the official docs at least gives people an idea who to +noisy on bugs. How many multiprocessing bugs have you had to reassign, or even *add* me to because people outside of our group don't know?
I see your point, but I think it could be better solved by a auto-nosy for the "Components" menu or the ability to tag issues.
Well, modulo tracker changes - I still think this could be useful in the main docs. Not to mention sphinx just makes them so pretty. jesse
On Tue, Sep 15, 2009 at 07:00:43PM -0400, Jesse Noller wrote:
On Tue, Sep 15, 2009 at 6:55 PM, Benjamin Peterson <benjamin@python.org> wrote:
2009/9/15 Jesse Noller <jnoller@gmail.com>:
On Tue, Sep 15, 2009 at 6:38 PM, R. David Murray <rdmurray@bitdance.com> wrote: Hmm, tables in a text file? I can see it, it's just always wacky.
emacs table mode!
while emacs might be the One True Editor, some of us are Unwashed Heathens who don't use it. So saying "emacs table mode" reads as "as useful as a beef jerky bikini" ;)
DIVERSITY! Sorry, had to say it. Nothing against beef jerky bikinis. --titus -- C. Titus Brown, ctb@msu.edu
Jesse Noller schrieb:
On Tue, Sep 15, 2009 at 6:55 PM, Benjamin Peterson <benjamin@python.org> wrote:
2009/9/15 Jesse Noller <jnoller@gmail.com>:
On Tue, Sep 15, 2009 at 6:38 PM, R. David Murray <rdmurray@bitdance.com> wrote: Hmm, tables in a text file? I can see it, it's just always wacky.
emacs table mode!
while emacs might be the One True Editor, some of us are Unwashed Heathens who don't use it. So saying "emacs table mode" reads as "as useful as a beef jerky bikini" ;)
Think of it that way: Emacs is the bacon of editors.
Why? It's not meant to be all official-like, just to help people triaging bugs or having questions about the code. I don't see how it would benefit the person trying to find out how to use module X in the official docs.
Having a table in the official docs at least gives people an idea who to +noisy on bugs. How many multiprocessing bugs have you had to reassign, or even *add* me to because people outside of our group don't know?
Hey, I got another idea! What about we simply add a second set of docs, for developers? We have lots of information scattered throughout the website, the source and the heads of important people (the most volatile sort), that, put together, should make a nice set of docs that could be collected (and made a sphinx tree). Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
Georg Brandl wrote:
Having a table in the official docs at least gives people an idea who to +noisy on bugs. How many multiprocessing bugs have you had to reassign, or even *add* me to because people outside of our group don't know?
As general note: I have the impression that the noisy list feature of the bug tracker is not exactly ideal to get attention for certain bugs from the right people. Perhaps it's better to just ask the various developers to setup email filters for this purpose; or maybe in addition to using the noisy lists. I've done that and while it's not perfect, it works a lot better than relying on someone putting me on e.g. the platform.py-related ticket noisy list.
Hey, I got another idea! What about we simply add a second set of docs, for developers?
We have lots of information scattered throughout the website, the source and the heads of important people (the most volatile sort), that, put together, should make a nice set of docs that could be collected (and made a sphinx tree).
Wouldn't a developer wiki (readable for everyone, writable only for developers) be a better and more direct way to handle this ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 16 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/
M.-A. Lemburg schrieb:
Georg Brandl wrote:
Having a table in the official docs at least gives people an idea who to +noisy on bugs. How many multiprocessing bugs have you had to reassign, or even *add* me to because people outside of our group don't know?
As general note: I have the impression that the noisy list feature of the bug tracker is not exactly ideal to get attention for certain bugs from the right people.
Perhaps it's better to just ask the various developers to setup email filters for this purpose; or maybe in addition to using the noisy lists.
I've done that and while it's not perfect, it works a lot better than relying on someone putting me on e.g. the platform.py-related ticket noisy list.
That's why at PyCon (or was it Europython?) we thought about a "tags" field for issues. The main use for tags would be module names (and it should be advertised as such in the UI for submitting bugs) with auto-nosy associations for module maintainers. (I don't want to call it "module name" because I could envision other useful tags as well.)
Hey, I got another idea! What about we simply add a second set of docs, for developers?
We have lots of information scattered throughout the website, the source and the heads of important people (the most volatile sort), that, put together, should make a nice set of docs that could be collected (and made a sphinx tree).
Wouldn't a developer wiki (readable for everyone, writable only for developers) be a better and more direct way to handle this ?
The source would be in the repo, so that's already writable for all developers (without them having to sign up to just *another* system, with another password etc.), and for the public an automated regular build, like I suggested in response to Laura, would be even nicer than a read-only wiki. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
Hi, Georg Brandl wrote:
That's why at PyCon (or was it Europython?) we thought about a "tags" field for issues. The main use for tags would be module names (and it should be advertised as such in the UI for submitting bugs) with auto-nosy associations for module maintainers. Arbitrary tags in a bug tracker are annoying. People will not try to find exiting tags but make up their own, making it hard to query for it. I would rather see an automatically generated module list based on the hg tip / svn head.
Regards, Armin
Armin Ronacher schrieb:
Hi,
Georg Brandl wrote:
That's why at PyCon (or was it Europython?) we thought about a "tags" field for issues. The main use for tags would be module names (and it should be advertised as such in the UI for submitting bugs) with auto-nosy associations for module maintainers. Arbitrary tags in a bug tracker are annoying. People will not try to find exiting tags but make up their own, making it hard to query for it.
I disagree. Again: we wouldn't ask submitters to populate that list with tags they make up, but the module name. In the process as I envision it now, further tags are added/changed by developers.
I would rather see an automatically generated module list based on the hg tip / svn head.
That's not so easy to do. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
On Wed, Sep 16, 2009 at 05:46, Georg Brandl <g.brandl@gmx.net> wrote:
Armin Ronacher schrieb:
Hi,
Georg Brandl wrote:
That's why at PyCon (or was it Europython?)
PyCon.
we thought about a "tags"
field for issues. The main use for tags would be module names (and it should be advertised as such in the UI for submitting bugs) with auto-nosy associations for module maintainers. Arbitrary tags in a bug tracker are annoying. People will not try to find exiting tags but make up their own, making it hard to query for it.
I disagree. Again: we wouldn't ask submitters to populate that list with tags they make up, but the module name. In the process as I envision it now, further tags are added/changed by developers.
Sounds reasonable to me. That would allow us to pull out some of the stuff we have in the Components list to make that clearer to use.
I would rather see an automatically generated module list based on the hg tip / svn head.
That's not so easy to do.
Nor really necessary once the initial list is done; we don't exactly add modules that frequently. -Brett
Georg
-- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
_______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig
Le mardi 15 septembre 2009 à 18:38 -0400, R. David Murray a écrit :
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors.
This is too complicated IMO. (a) + (b) is very sufficient and perhaps still not simple enough. I don't see any strong difference between maintainers and experts. As for casual contributors, I don't see any point in an exhaustive listing of them (which, depending on the module, may be very long and tedious and maintain).
An 'official maintainer' would be someone willing to take more-or-less full responsibility for a module (such as Jesse for Multiprocessing).
I don't think "full responsibility" is a good thing. See my other message (at 00:52 CEST) for why I think so. As a summary: A maintainer is someone who has a reasonable authority over a piece of code; it may be worth asking him for review or permission, but no core developer should be *required* to do so. On the contrary, we must encourage other people to be autonomous, learn the code, and be able to make decisions on their own. This is the only way to avoid dead ends like we nowadays have with several modules. It also discourages possessive behaviours (wrt. feature set, coding style, etc.), which is always a good thing. Regards Antoine.
On Tue, Sep 15, 2009 at 7:01 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 à 18:38 -0400, R. David Murray a écrit :
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors.
This is too complicated IMO. (a) + (b) is very sufficient and perhaps still not simple enough. I don't see any strong difference between maintainers and experts. As for casual contributors, I don't see any point in an exhaustive listing of them (which, depending on the module, may be very long and tedious and maintain).
but hey, if they're willing to write out all that info antoine ;) I think Antoine has a good point here. Can we start shorter (and simpler)?
An 'official maintainer' would be someone willing to take more-or-less full responsibility for a module (such as Jesse for Multiprocessing).
I don't think "full responsibility" is a good thing. See my other message (at 00:52 CEST) for why I think so.
Let's just stick to "tinpot maintainer" ;) jesse
On Tue, 15 Sep 2009 at 19:02, Jesse Noller wrote:
On Tue, Sep 15, 2009 at 7:01 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 � 18:38 -0400, R. David Murray a �crit :
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors.
This is too complicated IMO. (a) + (b) is very sufficient and perhaps still not simple enough. I don't see any strong difference between maintainers and experts. As for casual contributors, I don't see any point in an exhaustive listing of them (which, depending on the module, may be very long and tedious and maintain).
but hey, if they're willing to write out all that info antoine ;)
I think Antoine has a good point here. Can we start shorter (and simpler)?
OK, less work is fine by me. So instead of a full blown table, we have a file with two sections, and in each section we have a keyword (module name in the first section, expertise area in the second) followed by a list of tracker ids for people willing to make judgement calls on demand. Any lines that are blank means the person who doesn't feel qualified to make the judgement call gets to make it anyway :) This would also mean that this file serves a completely different purpose than the PEPs, and is thus not redundant with them. --David
On Tue, Sep 15, 2009 at 16:24, R. David Murray <rdmurray@bitdance.com> wrote:
On Tue, 15 Sep 2009 at 19:02, Jesse Noller wrote:
On Tue, Sep 15, 2009 at 7:01 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 à 18:38 -0400, R. David Murray a écrit :
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors.
This is too complicated IMO. (a) + (b) is very sufficient and perhaps still not simple enough. I don't see any strong difference between maintainers and experts. As for casual contributors, I don't see any point in an exhaustive listing of them (which, depending on the module, may be very long and tedious and maintain).
but hey, if they're willing to write out all that info antoine ;)
I think Antoine has a good point here. Can we start shorter (and simpler)?
OK, less work is fine by me.
So instead of a full blown table, we have a file with two sections, and in each section we have a keyword (module name in the first section, expertise area in the second) followed by a list of tracker ids for people willing to make judgement calls on demand. Any lines that are blank means the person who doesn't feel qualified to make the judgement call gets to make it anyway :)
Sounds great to me!
This would also mean that this file serves a completely different purpose than the PEPs, and is thus not redundant with them.
Right. And at some point we can write some code to mine the stdlib to make sure the list is not missing any modules and to potentially suggest maintainers for the blank modules. And for sanity reasons you might want to only do this in py3k. -Brett
On Wed, Sep 16, 2009 at 12:38 AM, R. David Murray <rdmurray@bitdance.com> wrote:
It has been mentioned here that some bugs languish in the tracker because there is no one willing to say "yes" or "no" to them. In at least some cases this may be because it is unclear who the best person is to ask for a decision when the participants in the issue don't feel qualified to decide. And in some cases, some of the people it may be unclear to may be the very people who _could_ decide...if only they knew that they were the closest thing to an expert on that module that we have.
In a discussion on IRC we came up with a proposal for a simple tool that might help out in this situation. I would like to propose that we create a file, tentatively named MISC/maintainers.txt, that contains two tables: (1) a table of all the modules in the standard library and (2) a table of 'areas of expertise' (things like Unicode, arithmetic, etc). Table (2) would be the simpler, and would just list people who felt they had enough expertise in the given area to be willing to make judgement calls on relevant issues on request.
That would be a third source of info about who maintains what. If this file is created it should maybe override and cover what PEP 360 and PEP 291 provides - some modules/packages backward compatibility infos - a list of externally maintained packages (some of these info are a bit outdated though) Regards Tarek
On Tue, Sep 15, 2009 at 7:01 PM, Tarek Ziadé <ziade.tarek@gmail.com> wrote:
On Wed, Sep 16, 2009 at 12:38 AM, R. David Murray <rdmurray@bitdance.com> wrote:
It has been mentioned here that some bugs languish in the tracker because there is no one willing to say "yes" or "no" to them. In at least some cases this may be because it is unclear who the best person is to ask for a decision when the participants in the issue don't feel qualified to decide. And in some cases, some of the people it may be unclear to may be the very people who _could_ decide...if only they knew that they were the closest thing to an expert on that module that we have.
In a discussion on IRC we came up with a proposal for a simple tool that might help out in this situation. I would like to propose that we create a file, tentatively named MISC/maintainers.txt, that contains two tables: (1) a table of all the modules in the standard library and (2) a table of 'areas of expertise' (things like Unicode, arithmetic, etc). Table (2) would be the simpler, and would just list people who felt they had enough expertise in the given area to be willing to make judgement calls on relevant issues on request.
That would be a third source of info about who maintains what.
If this file is created it should maybe override and cover what PEP 360 and PEP 291 provides
- some modules/packages backward compatibility infos - a list of externally maintained packages
(some of these info are a bit outdated though)
Oh man, those are dated. json isn't even in there.
On Wed, 16 Sep 2009 at 01:01, Tarek Ziad� wrote:
That would be a third source of info about who maintains what.
If this file is created it should maybe override and cover what PEP 360 and PEP 291 provides
- some modules/packages backward compatibility infos
I think this (PEP 291) should be referenced in the header of the file, since it would help inform various decisions. What it lists is something different from what maintainers.txt is proposed to list, since the PEP is talking about the maintenance of the non-stdlib versions of those modules. (Granted, that's relevant for the maintenance of the stdlib version, but not conclusive.)
- a list of externally maintained packages
Antoine should hate this one (PEP 360) :) And it is, essentially, a deprecated PEP. (Which opens the question of what we should do about the modules it lists...though apparently we can now remove optik/optparse from it.)
(some of these info are a bit outdated though)
Indeed. --David
In the age of wikis and mega-collaboration-web-toys, we're talking about a text file? Of course having 2 different information sources sounds wacky, but somehow somewhere this responsibility matrix should be googlable and colourful. Or at least linked ie - http://en.wikipedia.org/wiki/Knights_of_the_Round_Table#List_of_Knights On Wed, Sep 16, 2009 at 2:39 AM, R. David Murray <rdmurray@bitdance.com>wrote:
On Wed, 16 Sep 2009 at 01:01, Tarek Ziadé wrote:
That would be a third source of info about who maintains what.
If this file is created it should maybe override and cover what PEP 360 and PEP 291 provides
- some modules/packages backward compatibility infos
I think this (PEP 291) should be referenced in the header of the file, since it would help inform various decisions. What it lists is something different from what maintainers.txt is proposed to list, since the PEP is talking about the maintenance of the non-stdlib versions of those modules. (Granted, that's relevant for the maintenance of the stdlib version, but not conclusive.)
- a list of externally maintained packages
Antoine should hate this one (PEP 360) :) And it is, essentially, a deprecated PEP. (Which opens the question of what we should do about the modules it lists...though apparently we can now remove optik/optparse from it.)
(some of these info are a bit outdated though)
Indeed.
--David _______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig
On Tue, Sep 15, 2009 at 9:15 PM, Yuvgoog Greenle <ubershmekel@gmail.com> wrote:
In the age of wikis and mega-collaboration-web-toys, we're talking about a text file? Of course having 2 different information sources sounds wacky, but somehow somewhere this responsibility matrix should be googlable and colourful. Or at least linked ie - http://en.wikipedia.org/wiki/Knights_of_the_Round_Table#List_of_Knights
I would rather a sharp poke in the eye than a wiki. Besides; we use source control to do things like this, it's collaborative!
On Wed, 16 Sep 2009 at 04:15, Yuvgoog Greenle wrote:
In the age of wikis and mega-collaboration-web-toys, we're talking about a text file? Of course having 2 different information sources sounds wacky, but somehow somewhere this responsibility matrix should be googlable and colourful.
Well, it'll be Googlable via http://svn.python.org/view/python/trunk/Misc/maintainers.txt or the hg equivalent. It won't be colorful or linked that way. Perhaps a script that uploads a hyperlinked version to a page linked from the developer FAQ would be worthwhile. Care to volunteer to write one? As Jesse said, the reason for putting it in the repository is because that's where the core team does its collaboration. --David
Gladly :) I would need a few pointers though, where to write/upload, in what format and where is the developer's information (contact etc)? I hope passing this info won't be as bad as writing the script. On Wed, Sep 16, 2009 at 4:40 AM, R. David Murray <rdmurray@bitdance.com>wrote:
On Wed, 16 Sep 2009 at 04:15, Yuvgoog Greenle wrote:
In the age of wikis and mega-collaboration-web-toys, we're talking about a text file? Of course having 2 different information sources sounds wacky, but somehow somewhere this responsibility matrix should be googlable and colourful.
Well, it'll be Googlable via
http://svn.python.org/view/python/trunk/Misc/maintainers.txt
or the hg equivalent. It won't be colorful or linked that way.
Perhaps a script that uploads a hyperlinked version to a page linked from the developer FAQ would be worthwhile. Care to volunteer to write one?
As Jesse said, the reason for putting it in the repository is because that's where the core team does its collaboration.
--David
On Wed, 16 Sep 2009 at 04:59, Yuvgoog Greenle wrote:
Gladly :) I would need a few pointers though, where to write/upload, in what format and where is the developer's information (contact etc)? I hope passing this info won't be as bad as writing the script.
I think you'll want to make sure there's consensus that this is a good idea, first. I'm not sure what the details would be, actually, since I haven't yet been involved in the Python web site. I know the docs themselves are automatically uploaded...but we'd have to get buy-in from the pydotorg people to do this (and they'd be who would know how to do it). As for the linking, there you'd have to figure out how to map tracker ids into links into the tracker user page, which probably involves doing an query into the tracker database. The place to go for info there would be the tracker development list (tracker-discuss). So finding out everything you need to know is probably harder than writing the script :) --David
On Tue, Sep 15, 2009 at 16:39, R. David Murray <rdmurray@bitdance.com> wrote:
On Wed, 16 Sep 2009 at 01:01, Tarek Ziadé wrote:
That would be a third source of info about who maintains what.
If this file is created it should maybe override and cover what PEP 360 and PEP 291 provides
- some modules/packages backward compatibility infos
I think this (PEP 291) should be referenced in the header of the file, since it would help inform various decisions. What it lists is something different from what maintainers.txt is proposed to list, since the PEP is talking about the maintenance of the non-stdlib versions of those modules. (Granted, that's relevant for the maintenance of the stdlib version, but not conclusive.)
- a list of externally maintained packages
Antoine should hate this one (PEP 360) :) And it is, essentially, a deprecated PEP. (Which opens the question of what we should do about the modules it lists...though apparently we can now remove optik/optparse from it.)
The people who brought them in are the experts for those modules so just list them as such. -Brett
That would be a third source of info about who maintains what.
Is this just a formalization of what we already do now? I.E.. Georg "just-knows" that I maintain sets, collections, random, itertools; he assigns those bugs or feature requests to me; and if i dissappear, then other developers step in and rearrange all my code ;-) Raymond
On Tue, Sep 15, 2009 at 10:42 PM, Raymond Hettinger <python@rcn.com> wrote:
That would be a third source of info about who maintains what.
Is this just a formalization of what we already do now?
I.E.. Georg "just-knows" that I maintain sets, collections, random, itertools; he assigns those bugs or feature requests to me; and if i dissappear, then other developers step in and rearrange all my code ;-)
Somewhat, yes - it is a formalization. But it also helps some of us who don't spend enough time in the tracker to know *where* to move things. Ideally, this also helps us identify gaps in "personnel" coverage so we can: 1> Find someone who loves it enough to maintain it 2> jettison it into space if needed (I kid... sorta!) So yeah, it's a formalization + a data mining operation, and hopefully, a resource to the community to help identify people who should be added to bugs so poor Georg doesn't have to reassign everything. jesse
Le mardi 15 septembre 2009 à 19:42 -0700, Raymond Hettinger a écrit :
That would be a third source of info about who maintains what.
Is this just a formalization of what we already do now?
I cannot speak for David, but IMHO it should be a bit more than that. The underlying idea is to promote a broader (and therefore less exclusive) view of maintenership. We should extend the meaning of "maintainer" (or "expert" as also stated) to people who are 1) competent enough to give useful advice on (bug/feature) requests concerning a module and 2) at least moderately willing to do so; this rather than the supposed "owner" of a module, which is a notion we should discourage. Therefore, we can promote collective appropriation of code, to avoid the kind of deadlocks / gradual obsolescence we sometimes have with some specific pieces of code for which nobody wants to take responsibility without receiving an imprimatur from the "owner". But of course MISC/maintainers.txt is /already/ useful as just a centralized piece of information. Regards Antoine.
On Wed, Sep 16, 2009 at 3:47 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 à 19:42 -0700, Raymond Hettinger a écrit :
That would be a third source of info about who maintains what.
Is this just a formalization of what we already do now?
I cannot speak for David, but IMHO it should be a bit more than that.
The underlying idea is to promote a broader (and therefore less exclusive) view of maintenership. We should extend the meaning of "maintainer" (or "expert" as also stated) to people who are 1) competent enough to give useful advice on (bug/feature) requests concerning a module and 2) at least moderately willing to do so; this rather than the supposed "owner" of a module, which is a notion we should discourage.
+1 for this interpretation of maintainer. And a big +1 for Misc/maintainers.txt, or equivalent information elsewhere (a wiki page, perhaps). I've frequently found myself wanting this information when commenting on an issue (most recently for the curses module: the source says that AMK is the current maintainer, but I don't know whether that information is still in date, and if not, who else might be familiar enough to fix curses issues). I've not been around long enough to know the history of the various bits and pieces of Python. Mark
On Wed, Sep 16, 2009 at 08:05, Mark Dickinson <dickinsm@gmail.com> wrote:
On Wed, Sep 16, 2009 at 3:47 PM, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le mardi 15 septembre 2009 à 19:42 -0700, Raymond Hettinger a écrit :
That would be a third source of info about who maintains what.
Is this just a formalization of what we already do now?
I cannot speak for David, but IMHO it should be a bit more than that.
The underlying idea is to promote a broader (and therefore less exclusive) view of maintenership. We should extend the meaning of "maintainer" (or "expert" as also stated) to people who are 1) competent enough to give useful advice on (bug/feature) requests concerning a module and 2) at least moderately willing to do so; this rather than the supposed "owner" of a module, which is a notion we should discourage.
+1 for this interpretation of maintainer.
And a big +1 for Misc/maintainers.txt, or equivalent information elsewhere (a wiki page, perhaps). I've frequently found myself wanting this information when commenting on an issue (most recently for the curses module: the source says that AMK is the current maintainer, but I don't know whether that information is still in date, and if not, who else might be familiar enough to fix curses issues). I've not been around long enough to know the history of the various bits and pieces of Python.
This is the interpretation I have always held and this is the reason we should do this (don't wait, David, just make the list; people who don't like it can just ignore it). If we can help people who do issue triage by writing down knowledge that the rest of us have just instilled over the years then it is a benefit. -Brett
Late to the party. +1 for a list +1 for maintainers not owners Michael R. David Murray wrote:
It has been mentioned here that some bugs languish in the tracker because there is no one willing to say "yes" or "no" to them. In at least some cases this may be because it is unclear who the best person is to ask for a decision when the participants in the issue don't feel qualified to decide. And in some cases, some of the people it may be unclear to may be the very people who _could_ decide...if only they knew that they were the closest thing to an expert on that module that we have.
In a discussion on IRC we came up with a proposal for a simple tool that might help out in this situation. I would like to propose that we create a file, tentatively named MISC/maintainers.txt, that contains two tables: (1) a table of all the modules in the standard library and (2) a table of 'areas of expertise' (things like Unicode, arithmetic, etc). Table (2) would be the simpler, and would just list people who felt they had enough expertise in the given area to be willing to make judgement calls on relevant issues on request.
Table (1) would list, I propose, three categories of people: (a) 'official maintainer(s)', (b) experts, and (c) contributors. An 'official maintainer' would be someone willing to take more-or-less full responsibility for a module (such as Jesse for Multiprocessing). Experts would be people who feel they have a good working knowledge of the module and would not be afraid to sign off on the advisability and quality of a feature/bug fix when there is a question. Contributors would be anyone else with a more than casual knowledge of the module, but who aren't comfortable with signing off on the advisability of non-trivial patches/feature requests. My rational for including the third category is to have a pool of people who can self-promote as needed. These people can decide that it is OK to make the decision once they see that there is no one willing to declare themselves an expert in that module. I unfortunately expect a non-trivial number of modules to fall into this category.
The listing in the table would be by tracker id, to facilitate making people nosy on issues. The tracker id can be used to discover names and email addresses if those are needed instead.
Obviously one problem would be keeping this up to date, since when someone stops contributing they are fairly likely to not remove their name from the list. This task could be handled by anyone who does issue triage: if a triage person notices a maintainer or expert who has not responded to a request for decision on an issue, they can try pinging the person directly, and if they still get no response, mark the person (or request that the person be marked, if the triage person is not a committer) as 'deprecated'(*) in the maintainers file.
If this proposal or a modification of it is accepted I will volunteer to create the file and canvas python-dev for names.
--David
(*) I mean 'inactive' of course. :) _______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig
On Sep 15, 2009, at 1:54 PM, Antoine Pitrou wrote:
Python's reputation will certainly get tarnished, however, if widely-used modules get deprecated and removed. We will already get some damage with all of the py3k changes. No need to worsen our case, IMO.
I don't view this any differently than language evolution. We have a __future__ mechanism and policy for how language features change in incompatible ways between versions. Application developers may not like it, but it's published, they have forewarning, and a long period in which to migrate. New versions of Python break applications every time despite this, and despite lengthy beta releases. Yes, we get grief for that despite the policy, but tough. This is an all- volunteer loosely-organized herd of cats who work on this stuff for fun, taking time away from family, hobbies and sleep. Put up $10M/yr if you want to change that ('course, that's been tried <wink>). Still, we try to be responsible and responsive to our users, which is why we have a long deprecation period. The stdlib is the same IMO. It must evolve and that means cleaning out the cobwebs from time to time. We can do it in a way that gives full disclosure and ample time to adjust, but I really don't have any sympathy for libraries and applications that /never/ want to update, even though I've been on that side many times. If that's the case, then you will probably have a problem with upgrading Python /at all/ stdlib stagnation or not. Maintaining your own version of Python is a perfectly reasonable and viable option in that case. OTOH, we don't have to be rash or uncaring about it. A policy that provides an orderly, lengthy migration to better standard libraries seems responsible to me. The first steps can be to add the new library and put a big red warning in the docs of the old code, followed in later years by deprecation warnings in the library and hiding of the documentation, followed by its complete removal many years later. Heck, you probably won't even have to worry about it, it'll be your kids that have to actually remove it from Python :). -Barry
Barry Warsaw wrote:
On Sep 15, 2009, at 1:54 PM, Antoine Pitrou wrote:
Python's reputation will certainly get tarnished, however, if widely-used modules get deprecated and removed. We will already get some damage with all of the py3k changes. No need to worsen our case, IMO.
I don't view this any differently than language evolution. [...]
The stdlib is the same IMO. It must evolve and that means cleaning out the cobwebs from time to time. We can do it in a way that gives full disclosure and ample time to adjust, but I really don't have any sympathy for libraries and applications that /never/ want to update, even though I've been on that side many times.
I think that the stdlib needs a slightly different approach - the changes we apply in the language hardly ever cause serious breakage of code (except maybe the Py_ssize_t change, but folks won't notice until everyone starts running Python on Linux/x64 machines ;-). Removing a complete set of APIs or even a complete concept to approaching a problem is different, though. Those are major changes. I guess its time for a PEP outlining how such changes should be handled and which time frames to apply (release cycles can change, so years is probably a better unit). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 15 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/
participants (19)
-
Antoine Pitrou
-
Armin Ronacher
-
Barry Warsaw
-
Benjamin Peterson
-
Brett Cannon
-
C. Titus Brown
-
Collin Winter
-
David Stanek
-
Georg Brandl
-
Jesse Noller
-
Laura Creighton
-
M.-A. Lemburg
-
Mark Dickinson
-
Michael Foord
-
Paul Moore
-
R. David Murray
-
Raymond Hettinger
-
Tarek Ziadé
-
Yuvgoog Greenle