From 0265a93b24f2061d765d8f3eb0fc27c9fd080510 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 28 Jun 2016 06:36:02 -0400 Subject: Better handling of the REST API plumbing. * Add a version_info field which is a better way to do ordered comparisions of the API version. * All subresources now get their .api attribute set automatically, if they are passed back through the ObjectRouter. No more fiddling with context['api'] (unless of course, they don't make a roundtrip through the main ObjectRouter loop. --- src/mailman/core/api.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mailman/core/api.py') diff --git a/src/mailman/core/api.py b/src/mailman/core/api.py index b7841a9d8..e6e013af0 100644 --- a/src/mailman/core/api.py +++ b/src/mailman/core/api.py @@ -29,6 +29,7 @@ from zope.interface import implementer @implementer(IAPI) class API30: version = '3.0' + version_info = (3, 0) @classmethod def path_to(cls, resource): @@ -58,6 +59,7 @@ class API30: @implementer(IAPI) class API31: version = '3.1' + version_info = (3, 1) @classmethod def path_to(cls, resource): -- cgit v1.2.3-70-g09d2