-
Committer:
Barry Warsaw
-
Date:
2007-07-24 22:45:25 UTC
-
mto:
This revision was merged to the branch mainline in
revision
6537.
-
Revision ID:
barry@python.org-20070724224525-se7lcjwlrebbuhcw
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.