diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-05-24 07:34:00 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-05-24 07:34:00 +0200 |
commit | 8e4b65fc78f47a2be658b11ae30f84da66b13c2a (patch) | |
tree | af3562ba9cc7832c4686010ebb17c6ebe00eff11 /gitlab | |
parent | 441244b8d91ac0674195dbb2151570712d234d15 (diff) | |
download | gitlab-8e4b65fc78f47a2be658b11ae30f84da66b13c2a.tar.gz |
[v4] Remove deprecated objects methods and classes
Diffstat (limited to 'gitlab')
-rw-r--r-- | gitlab/__init__.py | 4 | ||||
-rw-r--r-- | gitlab/v4/objects.py | 28 |
2 files changed, 2 insertions, 30 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 8beccf0..d4ea1d9 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -96,7 +96,6 @@ class Gitlab(object): self._api_version) self.broadcastmessages = objects.BroadcastMessageManager(self) - self.keys = objects.KeyManager(self) self.deploykeys = objects.DeployKeyManager(self) self.gitlabciymls = objects.GitlabciymlManager(self) self.gitignores = objects.GitignoreManager(self) @@ -112,9 +111,10 @@ class Gitlab(object): self.sidekiq = objects.SidekiqManager(self) self.snippets = objects.SnippetManager(self) self.users = objects.UserManager(self) + self.todos = objects.TodoManager(self) if self._api_version == '3': + self.keys = objects.KeyManager(self) self.teams = objects.TeamManager(self) - self.todos = objects.TodoManager(self) # build the "submanagers" for parent_cls in six.itervalues(vars(objects)): diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 4e65893..eb3a579 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -307,23 +307,6 @@ class BroadcastMessageManager(BaseManager): obj_cls = BroadcastMessage -class Key(GitlabObject): - _url = '/deploy_keys' - canGet = 'from_list' - canCreate = False - canUpdate = False - canDelete = False - - def __init__(self, *args, **kwargs): - warnings.warn("`Key` is deprecated, use `DeployKey` instead", - DeprecationWarning) - super(Key, self).__init__(*args, **kwargs) - - -class KeyManager(BaseManager): - obj_cls = Key - - class DeployKey(GitlabObject): _url = '/deploy_keys' canGet = 'from_list' @@ -2047,11 +2030,6 @@ class Project(GitlabObject): raise_error_from_response(r, GitlabCreateError, 201) return Project(self.gitlab, r.json()) if r.status_code == 201 else self - def archive_(self, **kwargs): - warnings.warn("`archive_()` is deprecated, use `archive()` instead", - DeprecationWarning) - return self.archive(**kwargs) - def unarchive(self, **kwargs): """Unarchive a project. @@ -2067,12 +2045,6 @@ class Project(GitlabObject): raise_error_from_response(r, GitlabCreateError, 201) return Project(self.gitlab, r.json()) if r.status_code == 201 else self - def unarchive_(self, **kwargs): - warnings.warn("`unarchive_()` is deprecated, " - "use `unarchive()` instead", - DeprecationWarning) - return self.unarchive(**kwargs) - def share(self, group_id, group_access, **kwargs): """Share the project with a group. |