summaryrefslogtreecommitdiff
path: root/Mailman/Defaults.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-07-24 18:45:25 -0400
committerBarry Warsaw2007-07-24 18:45:25 -0400
commit7a7826e112a1d3f1999cb7a11e6df98cfcb712c9 (patch)
treea4c0679185aeb4f4e482e88198b6bee8737837f2 /Mailman/Defaults.py
parent8158f01c930d856b0ff892aab53cfbbcc25c85ec (diff)
downloadmailman-7a7826e112a1d3f1999cb7a11e6df98cfcb712c9.tar.gz
mailman-7a7826e112a1d3f1999cb7a11e6df98cfcb712c9.tar.zst
mailman-7a7826e112a1d3f1999cb7a11e6df98cfcb712c9.zip
Add setuptools plug-in entry point for defining different database backends.
Now someone could distribute a setuptools package that provided say, a MySQL database implementation and very easily override the stock database. How awesome is setuptools? Removed MANAGERS_INIT_FUNCTION since setuptools gives us a much more standard way of defining this plug-in entry point. Remove other old crud from Defaults.py. Restructure our own 'stock' database backend to be a plugin so it's totally on par with any other package. The only special case is that if more than one such entry point is defined, we filter out the 'stock' one (i.e. ours) under the assumption that the user is overriding it. If we still have more than one plug-in, it's an error. Restructure the initialization subsystem to use the plug-in, doing all the proper assertions and what not. The IDatabase interface defines what the database back-end plugin must provide. I've no doubt this will eventually need a bit more fleshing out, but it gives all this stuff a principled hook point instead of something ad-hoc.
Diffstat (limited to 'Mailman/Defaults.py')
-rw-r--r--Mailman/Defaults.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/Mailman/Defaults.py b/Mailman/Defaults.py
index 3c06b709a..7667bc753 100644
--- a/Mailman/Defaults.py
+++ b/Mailman/Defaults.py
@@ -1,5 +1,3 @@
-# -*- python -*-
-
# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
@@ -19,11 +17,6 @@
"""Distributed default settings for significant Mailman config variables."""
-# NEVER make site configuration changes to this file. ALWAYS make them in
-# mm_cfg.py instead, in the designated area. See the comments in that file
-# for details.
-
-
import os
from munepy import Enum
@@ -110,11 +103,6 @@ DEFAULT_VAR_DIRECTORY = '/var/mailman'
# Database options
#####
-# Initialization function for creating the IListManager, IUserManager, and
-# IMessageManager objects, as a Python dotted name. This function must take
-# zero arguments.
-MANAGERS_INIT_FUNCTION = 'Mailman.database.initialize'
-
# Use this to set the SQLAlchemy database engine URL. You generally have one
# primary database connection for all of Mailman. List data and most rosters
# will store their data in this database, although external rosters may access