summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mailman/core/system.py6
-rw-r--r--src/mailman/docs/system.txt (renamed from src/mailman/docs/version.txt)0
-rw-r--r--src/mailman/interfaces/system.py19
3 files changed, 19 insertions, 6 deletions
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.'),
+ ))