From 658fad42b04420962e6ac478247411ee77483d93 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 25 Apr 2012 22:08:22 -0400 Subject: General code cleanup. - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization. --- src/mailman/database/base.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mailman/database/base.py') diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py index a69e99395..1595007f1 100644 --- a/src/mailman/database/base.py +++ b/src/mailman/database/base.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see . -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals __metaclass__ = type __all__ = [ @@ -32,7 +32,7 @@ from lazr.config import as_boolean from pkg_resources import resource_listdir, resource_string from storm.cache import GenerationalCache from storm.locals import create_database, Store -from zope.interface import implements +from zope.interface import implementer from mailman.config import config from mailman.interfaces.database import IDatabase @@ -45,6 +45,7 @@ NL = '\n' +@implementer(IDatabase) class StormBaseDatabase: """The database base class for use with the Storm ORM. @@ -55,8 +56,6 @@ class StormBaseDatabase: # classes. TAG = '' - implements(IDatabase) - def __init__(self): self.url = None self.store = None @@ -187,7 +186,7 @@ class StormBaseDatabase: :param store: The Storm store to load the schema into. :type store: storm.locals.Store` - :param version: The schema version identifier of the form + :param version: The schema version identifier of the form YYYYMMDDHHMMSS. :type version: string :param filename: The file name containing the schema to load. Pass -- cgit v1.2.3-70-g09d2