summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELEASE_NOTES.rst19
-rw-r--r--gitlab/v4/objects.py4
2 files changed, 21 insertions, 2 deletions
diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index c495cb0..0c0098e 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -4,6 +4,25 @@ Release notes
This page describes important changes between python-gitlab releases.
+Changes from 1.0.2 to 1.1
+=========================
+
+* The ``ProjectUser`` class doesn't inherit from ``User`` anymore, and the
+ ``GroupProject`` class doesn't inherit from ``Project`` anymore. The Gitlab
+ API doesn't provide the same set of features for these objects, so
+ python-gitlab objects shouldn't try to workaround that.
+
+ You can create ``User`` or ``Project`` objects from ``ProjectUser`` and
+ ``GroupProject`` objects using the ``id`` attribute:
+
+ .. code-block:: python
+
+ for gr_project in group.projects.list():
+ # lazy object creation doesn't need an Gitlab API request
+ project = gl.projects.get(gr_project.id, lazy=True)
+ project.default_branch = 'develop'
+ project.save()
+
Changes from 0.21 to 1.0.0
==========================
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index bc96a24..0fe2ea5 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1601,7 +1601,7 @@ class ProjectTriggerManager(CRUDMixin, RESTManager):
_update_attrs = (('description', ), tuple())
-class ProjectUser(User):
+class ProjectUser(RESTObject):
pass
@@ -2244,7 +2244,7 @@ class ProjectManager(CRUDMixin, RESTManager):
'with_issues_enabled', 'with_merge_requests_enabled')
-class GroupProject(Project):
+class GroupProject(RESTObject):
pass