Barry Warsaw pushed to branch master at mailman / Mailman
Commits: 5a08c473 by Barry Warsaw at 2015-07-18T23:29:07Z Clean up based on review. - - - - - d903aa4b by Barry Warsaw at 2015-07-19T15:40:07Z Merge branch 'api' into 'master' REST API version 3.1 introduced. Mostly backward compatible with version 3.0 except that UUIDs are represented as hex strings instead of 128-bit integers, since the latter are not compatible with all versions of JavaScript. See merge request !28 - - - - - 3 changed files: - src/mailman/rest/helpers.py - src/mailman/rest/lists.py - src/mailman/rest/wsgiapp.py Changes: ===================================== src/mailman/rest/helpers.py ===================================== --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -54,6 +54,7 @@ def path_to(resource, api_version): system base URI. :type resource: string :param api_version: API version to report. + :type api_version: string :return: The full path to the resource. :rtype: bytes """ ===================================== src/mailman/rest/lists.py ===================================== --- a/src/mailman/rest/lists.py +++ b/src/mailman/rest/lists.py @@ -235,8 +235,7 @@ class MembersOfList(MemberCollection): def _get_collection(self, request): """See `CollectionMixin`.""" # Overrides _MemberBase._get_collection() because we only want to - # return the members from the requested roster. Don't call super() - # but be sure to set the request object. + # return the members from the requested roster. roster = self._mlist.get_roster(self._role) address_of_member = attrgetter('address.email') return list(sorted(roster.members, key=address_of_member)) ===================================== src/mailman/rest/wsgiapp.py ===================================== --- a/src/mailman/rest/wsgiapp.py +++ b/src/mailman/rest/wsgiapp.py @@ -52,6 +52,7 @@ class AdminWebServiceWSGIRequestHandler(WSGIRequestHandler): class SetAPIVersion: """Falcon middleware object that sets the api_version on resources.""" + def process_resource(self, request, response, resource): # Set this attribute on the resource right before it is dispatched # too. This can be used by the resource to provide different View it on GitLab: https://gitlab.com/mailman/mailman/compare/759efff6eb63b3ba1fff15193923a3df72eb552c...d903aa4ba57dc19699972bf22b7874edd90434a8
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org