Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit438dc2f

Browse files
author
Gauvain Pocentek
committed
Remove method marked as deprecated 7 months ago
1 parent83cb8c0 commit438dc2f

File tree

2 files changed

+0
-280
lines changed

2 files changed

+0
-280
lines changed

‎gitlab/__init__.py

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -703,47 +703,6 @@ def update(self, obj, **kwargs):
703703
raise_error_from_response(r,GitlabUpdateError)
704704
returnr.json()
705705

706-
defHook(self,id=None,**kwargs):
707-
"""Creates/tests/lists system hook(s) known by the GitLab server.
708-
709-
If id is None, returns a list of hooks.
710-
711-
If id is an integer, tests the matching hook.
712-
713-
If id is a dict, creates a new object using attributes provided. The
714-
object is NOT saved on the server. Use the save() method on the object
715-
to write it on the server.
716-
"""
717-
warnings.warn("`Hook` is deprecated, use `hooks` instead",
718-
DeprecationWarning)
719-
returnHook._get_list_or_object(self,id,**kwargs)
720-
721-
defProject(self,id=None,**kwargs):
722-
"""Creates/gets/lists project(s) known by the GitLab server.
723-
724-
If id is None, returns a list of projects.
725-
726-
If id is an integer, returns the matching project (or raises a
727-
GitlabGetError if not found)
728-
729-
If id is a dict, creates a new object using attributes provided. The
730-
object is NOT saved on the server. Use the save() method on the object
731-
to write it on the server.
732-
"""
733-
warnings.warn("`Project` is deprecated, use `projects` instead",
734-
DeprecationWarning)
735-
returnProject._get_list_or_object(self,id,**kwargs)
736-
737-
defUserProject(self,id=None,**kwargs):
738-
"""Creates a project for a user.
739-
740-
id must be a dict.
741-
"""
742-
warnings.warn("`UserProject` is deprecated, "
743-
"use `user_projects` instead",
744-
DeprecationWarning)
745-
returnUserProject._get_list_or_object(self,id,**kwargs)
746-
747706
def_list_projects(self,url,**kwargs):
748707
r=self._raw_get(url,**kwargs)
749708
raise_error_from_response(r,GitlabListError)
@@ -755,86 +714,3 @@ def _list_projects(self, url, **kwargs):
755714
l.append(p)
756715

757716
returnl
758-
759-
defsearch_projects(self,query,**kwargs):
760-
"""Searches projects by name.
761-
762-
Returns a list of matching projects.
763-
"""
764-
warnings.warn("`search_projects()` is deprecated, "
765-
"use `projects.search()` instead",
766-
DeprecationWarning)
767-
returnself._list_projects("/projects/search/"+query,**kwargs)
768-
769-
defall_projects(self,**kwargs):
770-
"""Lists all the projects (need admin rights)."""
771-
warnings.warn("`all_projects()` is deprecated, "
772-
"use `projects.all()` instead",
773-
DeprecationWarning)
774-
returnself._list_projects("/projects/all",**kwargs)
775-
776-
defowned_projects(self,**kwargs):
777-
"""Lists owned projects."""
778-
warnings.warn("`owned_projects()` is deprecated, "
779-
"use `projects.owned()` instead",
780-
DeprecationWarning)
781-
returnself._list_projects("/projects/owned",**kwargs)
782-
783-
defGroup(self,id=None,**kwargs):
784-
"""Creates/gets/lists group(s) known by the GitLab server
785-
786-
Args:
787-
id: If id is None, returns a list of groups.
788-
id: If id is an integer,
789-
returns the matching group (or raises a GitlabGetError if not
790-
found).
791-
id: If id is a dict, creates a new object using attributes
792-
provided. The object is NOT saved on the server. Use the
793-
save() method on the object to write it on the server.
794-
kwargs: Arbitrary keyword arguments
795-
"""
796-
warnings.warn("`Group` is deprecated, use `groups` instead",
797-
DeprecationWarning)
798-
returnGroup._get_list_or_object(self,id,**kwargs)
799-
800-
defIssue(self,id=None,**kwargs):
801-
"""Lists issues(s) known by the GitLab server.
802-
803-
Does not support creation or getting a single issue unlike other
804-
methods in this class yet.
805-
"""
806-
warnings.warn("`Issue` is deprecated, use `issues` instead",
807-
DeprecationWarning)
808-
returnIssue._get_list_or_object(self,id,**kwargs)
809-
810-
defUser(self,id=None,**kwargs):
811-
"""Creates/gets/lists users(s) known by the GitLab server.
812-
813-
If id is None, returns a list of users.
814-
815-
If id is an integer, returns the matching user (or raises a
816-
GitlabGetError if not found)
817-
818-
If id is a dict, creates a new object using attributes provided. The
819-
object is NOT saved on the server. Use the save() method on the object
820-
to write it on the server.
821-
"""
822-
warnings.warn("`User` is deprecated, use `users` instead",
823-
DeprecationWarning)
824-
returnUser._get_list_or_object(self,id,**kwargs)
825-
826-
defTeam(self,id=None,**kwargs):
827-
"""Creates/gets/lists team(s) known by the GitLab server.
828-
829-
If id is None, returns a list of teams.
830-
831-
If id is an integer, returns the matching team (or raises a
832-
GitlabGetError if not found)
833-
834-
If id is a dict, create a new object using attributes provided. The
835-
object is NOT saved on the server. Use the save() method on the object
836-
to write it on the server.
837-
"""
838-
warnings.warn("`Team` is deprecated, use `teams` instead",
839-
DeprecationWarning)
840-
returnTeam._get_list_or_object(self,id,**kwargs)

‎gitlab/objects.py

Lines changed: 0 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,6 @@ def _data_for_gitlab(self, extra_parameters={}, update=False):
578578
self.confirm=str(self.confirm).lower()
579579
returnsuper(User,self)._data_for_gitlab(extra_parameters)
580580

581-
defKey(self,id=None,**kwargs):
582-
warnings.warn("`Key` is deprecated, use `keys` instead",
583-
DeprecationWarning)
584-
returnUserKey._get_list_or_object(self.gitlab,id,
585-
user_id=self.id,
586-
**kwargs)
587-
588581
defblock(self,**kwargs):
589582
"""Blocks the user."""
590583
url='/users/%s/block'%self.id
@@ -687,11 +680,6 @@ class CurrentUser(GitlabObject):
687680
('keys',CurrentUserKeyManager, [('user_id','id')])
688681
]
689682

690-
defKey(self,id=None,**kwargs):
691-
warnings.warn("`Key` is deprecated, use `keys` instead",
692-
DeprecationWarning)
693-
returnCurrentUserKey._get_list_or_object(self.gitlab,id,**kwargs)
694-
695683

696684
classApplicationSettings(GitlabObject):
697685
_url='/application/settings'
@@ -805,13 +793,6 @@ class Group(GitlabObject):
805793
VISIBILITY_INTERNAL=gitlab.VISIBILITY_INTERNAL
806794
VISIBILITY_PUBLIC=gitlab.VISIBILITY_PUBLIC
807795

808-
defMember(self,id=None,**kwargs):
809-
warnings.warn("`Member` is deprecated, use `members` instead",
810-
DeprecationWarning)
811-
returnGroupMember._get_list_or_object(self.gitlab,id,
812-
group_id=self.id,
813-
**kwargs)
814-
815796
deftransfer_project(self,id,**kwargs):
816797
"""Transfers a project to this new groups.
817798
@@ -1222,14 +1203,6 @@ def _data_for_gitlab(self, extra_parameters={}, update=False):
12221203
returnsuper(ProjectIssue,self)._data_for_gitlab(extra_parameters,
12231204
update)
12241205

1225-
defNote(self,id=None,**kwargs):
1226-
warnings.warn("`Note` is deprecated, use `notes` instead",
1227-
DeprecationWarning)
1228-
returnProjectIssueNote._get_list_or_object(self.gitlab,id,
1229-
project_id=self.project_id,
1230-
issue_id=self.id,
1231-
**kwargs)
1232-
12331206
defsubscribe(self,**kwargs):
12341207
"""Subscribe to an issue.
12351208
@@ -1396,13 +1369,6 @@ class ProjectMergeRequest(GitlabObject):
13961369
managers= [('notes',ProjectMergeRequestNoteManager,
13971370
[('project_id','project_id'), ('merge_request_id','id')])]
13981371

1399-
defNote(self,id=None,**kwargs):
1400-
warnings.warn("`Note` is deprecated, use `notes` instead",
1401-
DeprecationWarning)
1402-
returnProjectMergeRequestNote._get_list_or_object(
1403-
self.gitlab,id,project_id=self.project_id,
1404-
merge_request_id=self.id,**kwargs)
1405-
14061372
def_data_for_gitlab(self,extra_parameters={},update=False):
14071373
data= (super(ProjectMergeRequest,self)
14081374
._data_for_gitlab(extra_parameters,update=update))
@@ -1683,15 +1649,6 @@ def Content(self, **kwargs):
16831649
DeprecationWarning)
16841650
returnself.content()
16851651

1686-
defNote(self,id=None,**kwargs):
1687-
warnings.warn("`Note` is deprecated, use `notes` instead",
1688-
DeprecationWarning)
1689-
returnProjectSnippetNote._get_list_or_object(
1690-
self.gitlab,id,
1691-
project_id=self.project_id,
1692-
snippet_id=self.id,
1693-
**kwargs)
1694-
16951652
defcontent(self,streamed=False,action=None,chunk_size=1024,**kwargs):
16961653
"""Return the raw content of a snippet.
16971654
@@ -1791,105 +1748,6 @@ class Project(GitlabObject):
17911748
VISIBILITY_INTERNAL=gitlab.VISIBILITY_INTERNAL
17921749
VISIBILITY_PUBLIC=gitlab.VISIBILITY_PUBLIC
17931750

1794-
defBranch(self,id=None,**kwargs):
1795-
warnings.warn("`Branch` is deprecated, use `branches` instead",
1796-
DeprecationWarning)
1797-
returnProjectBranch._get_list_or_object(self.gitlab,id,
1798-
project_id=self.id,
1799-
**kwargs)
1800-
1801-
defCommit(self,id=None,**kwargs):
1802-
warnings.warn("`Commit` is deprecated, use `commits` instead",
1803-
DeprecationWarning)
1804-
returnProjectCommit._get_list_or_object(self.gitlab,id,
1805-
project_id=self.id,
1806-
**kwargs)
1807-
1808-
defEvent(self,id=None,**kwargs):
1809-
warnings.warn("`Event` is deprecated, use `events` instead",
1810-
DeprecationWarning)
1811-
returnProjectEvent._get_list_or_object(self.gitlab,id,
1812-
project_id=self.id,
1813-
**kwargs)
1814-
1815-
defFile(self,id=None,**kwargs):
1816-
warnings.warn("`File` is deprecated, use `files` instead",
1817-
DeprecationWarning)
1818-
returnProjectFile._get_list_or_object(self.gitlab,id,
1819-
project_id=self.id,
1820-
**kwargs)
1821-
1822-
defHook(self,id=None,**kwargs):
1823-
warnings.warn("`Hook` is deprecated, use `hooks` instead",
1824-
DeprecationWarning)
1825-
returnProjectHook._get_list_or_object(self.gitlab,id,
1826-
project_id=self.id,
1827-
**kwargs)
1828-
1829-
defKey(self,id=None,**kwargs):
1830-
warnings.warn("`Key` is deprecated, use `keys` instead",
1831-
DeprecationWarning)
1832-
returnProjectKey._get_list_or_object(self.gitlab,id,
1833-
project_id=self.id,
1834-
**kwargs)
1835-
1836-
defIssue(self,id=None,**kwargs):
1837-
warnings.warn("`Issue` is deprecated, use `issues` instead",
1838-
DeprecationWarning)
1839-
returnProjectIssue._get_list_or_object(self.gitlab,id,
1840-
project_id=self.id,
1841-
**kwargs)
1842-
1843-
defLabel(self,id=None,**kwargs):
1844-
warnings.warn("`Label` is deprecated, use `labels` instead",
1845-
DeprecationWarning)
1846-
returnProjectLabel._get_list_or_object(self.gitlab,id,
1847-
project_id=self.id,
1848-
**kwargs)
1849-
1850-
defMember(self,id=None,**kwargs):
1851-
warnings.warn("`Member` is deprecated, use `members` instead",
1852-
DeprecationWarning)
1853-
returnProjectMember._get_list_or_object(self.gitlab,id,
1854-
project_id=self.id,
1855-
**kwargs)
1856-
1857-
defMergeRequest(self,id=None,**kwargs):
1858-
warnings.warn(
1859-
"`MergeRequest` is deprecated, use `mergerequests` instead",
1860-
DeprecationWarning)
1861-
returnProjectMergeRequest._get_list_or_object(self.gitlab,id,
1862-
project_id=self.id,
1863-
**kwargs)
1864-
1865-
defMilestone(self,id=None,**kwargs):
1866-
warnings.warn("`Milestone` is deprecated, use `milestones` instead",
1867-
DeprecationWarning)
1868-
returnProjectMilestone._get_list_or_object(self.gitlab,id,
1869-
project_id=self.id,
1870-
**kwargs)
1871-
1872-
defNote(self,id=None,**kwargs):
1873-
warnings.warn("`Note` is deprecated, use `notes` instead",
1874-
DeprecationWarning)
1875-
returnProjectNote._get_list_or_object(self.gitlab,id,
1876-
project_id=self.id,
1877-
**kwargs)
1878-
1879-
defSnippet(self,id=None,**kwargs):
1880-
warnings.warn("`Snippet` is deprecated, use `snippets` instead",
1881-
DeprecationWarning)
1882-
returnProjectSnippet._get_list_or_object(self.gitlab,id,
1883-
project_id=self.id,
1884-
**kwargs)
1885-
1886-
defTag(self,id=None,**kwargs):
1887-
warnings.warn("`Tag` is deprecated, use `tags` instead",
1888-
DeprecationWarning)
1889-
returnProjectTag._get_list_or_object(self.gitlab,id,
1890-
project_id=self.id,
1891-
**kwargs)
1892-
18931751
deftree(self,path='',ref_name='',**kwargs):
18941752
warnings.warn("`tree` is deprecated, use `repository_tree` instead",
18951753
DeprecationWarning)
@@ -2366,20 +2224,6 @@ class Team(GitlabObject):
23662224
('projects',TeamProjectManager, [('team_id','id')])
23672225
]
23682226

2369-
defMember(self,id=None,**kwargs):
2370-
warnings.warn("`Member` is deprecated, use `members` instead",
2371-
DeprecationWarning)
2372-
returnTeamMember._get_list_or_object(self.gitlab,id,
2373-
team_id=self.id,
2374-
**kwargs)
2375-
2376-
defProject(self,id=None,**kwargs):
2377-
warnings.warn("`Project` is deprecated, use `projects` instead",
2378-
DeprecationWarning)
2379-
returnTeamProject._get_list_or_object(self.gitlab,id,
2380-
team_id=self.id,
2381-
**kwargs)
2382-
23832227

23842228
classTeamManager(BaseManager):
23852229
obj_cls=Team

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp