FAQ
Somewhat off topic so skip this email if you want to.
On 01/19/09 15:24, Mark Sapiro wrote:
Good point. Unfortunately, the current implementation doesn't lend
itself to that. While each tool (admin mass subscribe,
bin/add_members and bin/sync_members) that does bulk adds currently
uses a common function to parse the input into name and address, that
function is part of the Python email library and would have to be
replaced by some other, possibly Mailman specific, function to handle
the password. Further, the parsing and resultant passing of the
parsed values is done in the tool, not in the underlying method which
adds the member, so each tool would have to be modified individually
anyway.
Ok... It is my (mis)understanding that this is one of the nice things
about Object Oriented programming languages like Python in such as it is
possible to have a new class inherit a parent's class and then extend
it. I would think that this type of things would lend its self to this,
maybe not. If it did, you would just start referencing the new extended
class object rather than the one built in to Python. But seeing what I
think of OO, and to some extent Python, I may be speaking out my <BEEP>.
Of course, it this were to be done, there should be a common syntax
for optionally adding the password information.
*nod*

So the question becomes, is it worth the effort to provide future
functionality, something that I can't answer.



Grant. . . .

Search Discussions

  • Mark Sapiro at Jan 19, 2009 at 11:07 pm

    Grant Taylor wrote:
    Somewhat off topic so skip this email if you want to.

    And this reply is equally OT

    Ok... It is my (mis)understanding that this is one of the nice things
    about Object Oriented programming languages like Python in such as it is
    possible to have a new class inherit a parent's class and then extend
    it. I would think that this type of things would lend its self to this,
    maybe not. If it did, you would just start referencing the new extended
    class object rather than the one built in to Python. But seeing what I
    think of OO, and to some extent Python, I may be speaking out my <BEEP>.

    Each of the tools imports the Python email package and calls
    email.Utils.getaddresses() to parse an input line into name and
    address. This is a utility function, not a class method, but that's
    really irrelevant to this issue.

    The issue is in the design of Mailman each of these bulk add tools
    parses the input and passes the result to the underlying list method
    to add the member. Had it been designed to pass the raw input to a
    single method, that method alone could be enhanced to parse out a
    password, but that isn't how it's done.

    Thus, each tool needs to be modified in some, albeit simple, way to do
    this.

    Even if the argument parsing was a class method, and a subclass was
    defined that extended the method, the individual tools would still
    have to be changed to reference the subclass and make use of the
    "password" result.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Stephen J. Turnbull at Jan 20, 2009 at 3:04 am
    Grant Taylor writes:
    Ok... It is my (mis)understanding that this is one of the nice things
    about Object Oriented programming languages like Python in such as it is
    possible to have a new class inherit a parent's class and then extend
    it. I would think that this type of things would lend its self to this,
    It does. However, it has to be designed in, and Mailman was
    originally designed in a much more friendly Internet for use by
    communities of friendly users.

    Once the code has been written, however, changing the design becomes
    what is called "refactoring", which requires orders of magnitude more
    effort because you not only have to decide what is desirable, but you
    must also make sure that everything that used to work continue to
    work, even if it wasn't part of the original design, because somebody
    found out how to make it do something useful. :-)

    This effort is sufficiently large that when it is done there is
    invariably a major version bump. Ie, this is what Mailman 3 is all
    about. In fact, changes have been made to Mailman 3 to make exactly
    this kind of thing easier to add in a way that is consistent from the
    user's (ie, the list admin in this case) perspective.

    I suggest you ask on Mailman Developers if your use case has been
    taken into account. I don't think the user database integration has
    proceeded very far, so now is a good time to make feature requests.
    (I don't speak for Barry, of course.)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedJan 19, '09 at 10:01p
activeJan 20, '09 at 3:04a
posts3
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase