After starting a thread on this list (http://mail.python.org/pipermail/mailman-developers/2006-May/018787.html> and also posting a request for feedback on Mailman-Users <http://mail.python.org/pipermail/mailman-users/2006-June/051588.html> which received no replies, I think I'm almost done with this. My patch is attached for review, comment.
Basically, I implement a new Utils.strip_verbose_pattern() function which converts verbose patterns to single-line, non-verbose equivalents and add code to versions.py for a one time conversion of existing topics regexps.
I then modify the Gui, etc so that all future multi-line patterns are stored as entered, but compiled and used with the lines connected by '|'.
Specifically, I would like advice and comment on two things.
First since the strip_verbose_pattern() function is basically a one-time, list conversion function, would it be better added to versions.py rather than Utils.py.
Second, when a topic pattern is first entered, an attempt is made to compile it, and if this throws an exception, the error is reported in the Gui and the topic is ignored. A similar thing is also done in MailList.py which will catch (eventually) and log bad topic regexps that might be entered with config_list or withlist.
My question here is in the error message and log message, The pattern I report as invalid is the '|' joined pattern and not the original entry. I think this makes more sense, but I'm interested in what others think.
Finally, in writing this post I have thought of another issue. Someone may have a saved config_list 'template' with old style 'verbose' topic regexps which wouldn't get converted if applied to a new 2.2.x list. Is this something to be concerned about? Note that this could be an issue any time a list attribute is deleted or has its set of values manipulated.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (1)
-
Mark Sapiro