summaryrefslogtreecommitdiff
path: root/Mailman/app/create.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a problem where members of a deleted mailing list were hanging around.Barry Warsaw2007-08-051-60/+0
| | | | | | | | | | | | | | | | | | | | This would cause duplicate members (e.g. owners) if you created, deleted and then recreated the mailing list. Mailman.app.create -> Mailman.app.lifecycle; Mailman/doc/create.txt -> Mailman/doc/lifecycle.txt; also added a remove_list() function. Added SubscriptionError base class, made HostileSubscriptionError inherit from that, and added a new AlreadySubscribedError. Rewrote bin/rmlist to use the new lifecycle.remove_list() function. IAddress.subscribe() must now throw an AlreadySubscribedError if the address is already subscribed to the mailing list with the given role. Added a Subscribers roster, attached to the IMailingList which gives access to all subscribers of a mailing list, regardless of their role. Added a new test for this roster.
* Added a doctest for the Mailman.app.create module.Barry Warsaw2007-08-051-1/+15
| | | | | | | | | | | | | | | BadListNameError is gone. Use InvalidEmailAddress instead. Move owner registration from bin/newlist to Mailman/app/create.py, but do not verified owner email addresses here. Eventually we'll hook in the IRegistrar stuff for unverified owner addresses. IStyleManager.register() verifies that its registering an IStyle. Added IStyleManager.unregister(), along with updated interfaces and doctests. Clean up all styles except the default one in the system documentation test harness.
* It all started by trying to remove MailList.Create() and use the IListManagerBarry Warsaw2007-08-051-0/+46
interface to create and delete lists. Mostly that's working now, but I need unit tests for most of the new work contained in this revision. Implemented a rudimentary 'list styles' subsystem, along with interfaces, but no tests yet. Moved all of MailList.InitVars() into a DefaultStyle, which is always available at priority zero. It's used by default if there are no matching styles for a mailing list. Because of the list styles, we can now get rid of (almost) all InitVars() methods. And because of /that/ we can get rid of the mixin clases whose sole purpose was to provide an InitVars() method. Yay for code removal! Mixin modules/classes removed: Autoresponder, GatewayManager, TopicManager. Removed the Mailman/ext crufty extension mechanism. Extensions will now be done using setuptools plugins. Hopefully this will take us everywhere we need to go, but I'll add Mailman.ext back if necessary later. Mailiman.app.create module added to implement a common, higher-level list creation feature. This is used by bin/newlist now, though some of that functionality (namely, ensuring the owners exist in the database, and notifying the owners) should be moved here. The MTA plugins aren't yet integrated into this, but need to be. Mailman.app.plugins module added to generalize setuptools plugin management. Defaults.DEFAULT_REPLY_GOES_TO_LIST now gets initialized with a proper enum. Also, the duplicate DeliveryMode and DeliveryStatus enums are removed from Defaults because they're in Mailman.constants. Added Errors.DuplicateStyleError. Updated Utils.list_exists() to use the new IListManager.get() interface, which has been changed to return None if the list doesn't exist (for consistency) instead of raising an exception. Utils.list_names() also needed to be fixed to use config.db.list_manager. bin/make_instance, bin/newlist, bin/rmlist changed to use parser.error() istead of printing to sys.stderr and sys.exit(1). bin/newlist and bin/rmlist now works with the IListManager interface, so you can create and delete lists from the command line again. The CLI for newlist has been much simplified; it no longer prompts for missing positional arguments. It now uses a more traditional CLI. newlist also accepts zero to many owners, and it ensures that the owners are all in the database. It no longer asks for a list password, because this doesn't make sense any more. bin/withlist has also been fixed to work with the IListManager interface. There are lots of XXXs and FIXMEs that need to be resolved before this can land. Also, we need to test all this stuff before it can land. Configuration.load() is now taught to search in sys.argv[0] for var/etc/mailman.cfg since this is where it is for egg development layouts. Also, VAR_DIR must be abspath'd. Added an __all__ to Mailman.constants, and added an Action enum. The listmanager implementation has to set the mlist.created_at time. There's also a bit of crufty refactoring going on to instantiate the roster objects whenever the list is created or retrieved from the database. Several MailingList column types are now set to our custom TimeDeltaType, which knows how to store a datetime.timedelta. A SQLAlchemny converter type is added to Mailman.database.types. I also fixed a bug in the EnumType implementation.