diff options
| -rw-r--r-- | buildout.cfg | 2 | ||||
| -rw-r--r-- | src/mailman/core/system.py | 6 | ||||
| -rw-r--r-- | src/mailman/docs/system.txt (renamed from src/mailman/docs/version.txt) | 0 | ||||
| -rw-r--r-- | src/mailman/interfaces/system.py | 19 |
4 files changed, 20 insertions, 7 deletions
diff --git a/buildout.cfg b/buildout.cfg index e98e4a81d..d44d1d428 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -13,7 +13,7 @@ eggs = argparse lazr.config lazr.delegates - /Users/barry/projects/lazr/lazr.restful + lazr.restful locknix mailman munepy diff --git a/src/mailman/core/system.py b/src/mailman/core/system.py index 0f6d0834f..18fdfc10c 100644 --- a/src/mailman/core/system.py +++ b/src/mailman/core/system.py @@ -26,7 +26,9 @@ __all__ = [ import sys + from zope.interface import implements +from zope.location.interfaces import ILocation from mailman import version from mailman.interfaces.system import ISystem @@ -34,14 +36,16 @@ from mailman.interfaces.system import ISystem class System: - implements(ISystem) + implements(ISystem, ILocation) @property def mailman_version(self): + """See `ISystem`.""" return version.MAILMAN_VERSION_FULL @property def python_version(self): + """See `ISystem`.""" return sys.version diff --git a/src/mailman/docs/version.txt b/src/mailman/docs/system.txt index 3ed0ce28c..3ed0ce28c 100644 --- a/src/mailman/docs/version.txt +++ b/src/mailman/docs/system.txt diff --git a/src/mailman/interfaces/system.py b/src/mailman/interfaces/system.py index da7d019e6..62270803d 100644 --- a/src/mailman/interfaces/system.py +++ b/src/mailman/interfaces/system.py @@ -25,15 +25,24 @@ __all__ = [ ] -from zope.interface import Interface, Attribute +from lazr.restful.declarations import export_as_webservice_entry, exported +from zope.schema import TextLine + +from mailman.i18n import _ class ISystem(Interface): """Information about the Mailman system.""" - mailman_version = Attribute( - """The GNU Mailman version, as a string.""") + export_as_webservice_entry() + + mailman_version = exported(TextLine( + title=_('Mailman version'), + description=_('The GNU Mailman version.'), + )) - python_version = Attribute( - """The version of Python running Mailman, as a string.""") + python_version = exported(TextLine( + title=_('Python version'), + description=_('The Python version.'), + )) |
