summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-05-19 08:01:33 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2018-05-19 08:03:28 +0200
commita877514d565a1273fe21e81d1d00e1ed372ece4c (patch)
treeb573fca9d8ea84abc81dd46a4d3286f96366d5a3 /gitlab/v4/objects.py
parent5335788480d840566d745d39deb85895a5fc93af (diff)
downloadgitlab-a877514d565a1273fe21e81d1d00e1ed372ece4c.tar.gz
Deprecate GetFromListMixin
This mixin provides a workaround for get() for GitLab objects that don't implement a 'get a single object' API. We are now getting conflicts because GitLab adds GET methods, and this is against the "Implement only what exists in the API" strategy. Also use the proper GET API call for objects that support it.
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 1cb8fe7..0e28f5c 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -547,8 +547,7 @@ class GroupMember(SaveMixin, ObjectDeleteMixin, RESTObject):
_short_print_attr = 'username'
-class GroupMemberManager(ListMixin, GetMixin, CreateMixin, UpdateMixin,
- DeleteMixin, RESTManager):
+class GroupMemberManager(CRUDMixin, RESTManager):
_path = '/groups/%(group_id)s/members'
_obj_cls = GroupMember
_from_parent_attrs = {'group_id': 'id'}
@@ -822,7 +821,7 @@ class Namespace(RESTObject):
pass
-class NamespaceManager(GetFromListMixin, RESTManager):
+class NamespaceManager(RetrieveMixin, RESTManager):
_path = '/namespaces'
_obj_cls = Namespace
_list_filters = ('search', )
@@ -854,7 +853,7 @@ class ProjectBoard(RESTObject):
_managers = (('lists', 'ProjectBoardListManager'), )
-class ProjectBoardManager(GetFromListMixin, RESTManager):
+class ProjectBoardManager(RetrieveMixin, RESTManager):
_path = '/projects/%(project_id)s/boards'
_obj_cls = ProjectBoard
_from_parent_attrs = {'project_id': 'id'}