@@ -578,13 +578,6 @@ def _data_for_gitlab(self, extra_parameters={}, update=False):
578578 self .confirm = str (self .confirm ).lower ()
579579 return super (User , self )._data_for_gitlab (extra_parameters )
580580
581- def Key (self , id = None , ** kwargs ):
582- warnings .warn ("`Key` is deprecated, use `keys` instead" ,
583- DeprecationWarning )
584- return UserKey ._get_list_or_object (self .gitlab , id ,
585- user_id = self .id ,
586- ** kwargs )
587-
588581 def block (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- def Key (self , id = None , ** kwargs ):
691- warnings .warn ("`Key` is deprecated, use `keys` instead" ,
692- DeprecationWarning )
693- return CurrentUserKey ._get_list_or_object (self .gitlab , id , ** kwargs )
694-
695683
696684class ApplicationSettings (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- def Member (self , id = None , ** kwargs ):
809- warnings .warn ("`Member` is deprecated, use `members` instead" ,
810- DeprecationWarning )
811- return GroupMember ._get_list_or_object (self .gitlab , id ,
812- group_id = self .id ,
813- ** kwargs )
814-
815796 def transfer_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 return super (ProjectIssue , self )._data_for_gitlab (extra_parameters ,
12231204 update )
12241205
1225- def Note (self , id = None , ** kwargs ):
1226- warnings .warn ("`Note` is deprecated, use `notes` instead" ,
1227- DeprecationWarning )
1228- return ProjectIssueNote ._get_list_or_object (self .gitlab , id ,
1229- project_id = self .project_id ,
1230- issue_id = self .id ,
1231- ** kwargs )
1232-
12331206 def subscribe (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- def Note (self , id = None , ** kwargs ):
1400- warnings .warn ("`Note` is deprecated, use `notes` instead" ,
1401- DeprecationWarning )
1402- return ProjectMergeRequestNote ._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 return self .content ()
16851651
1686- def Note (self , id = None , ** kwargs ):
1687- warnings .warn ("`Note` is deprecated, use `notes` instead" ,
1688- DeprecationWarning )
1689- return ProjectSnippetNote ._get_list_or_object (
1690- self .gitlab , id ,
1691- project_id = self .project_id ,
1692- snippet_id = self .id ,
1693- ** kwargs )
1694-
16951652 def content (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- def Branch (self , id = None , ** kwargs ):
1795- warnings .warn ("`Branch` is deprecated, use `branches` instead" ,
1796- DeprecationWarning )
1797- return ProjectBranch ._get_list_or_object (self .gitlab , id ,
1798- project_id = self .id ,
1799- ** kwargs )
1800-
1801- def Commit (self , id = None , ** kwargs ):
1802- warnings .warn ("`Commit` is deprecated, use `commits` instead" ,
1803- DeprecationWarning )
1804- return ProjectCommit ._get_list_or_object (self .gitlab , id ,
1805- project_id = self .id ,
1806- ** kwargs )
1807-
1808- def Event (self , id = None , ** kwargs ):
1809- warnings .warn ("`Event` is deprecated, use `events` instead" ,
1810- DeprecationWarning )
1811- return ProjectEvent ._get_list_or_object (self .gitlab , id ,
1812- project_id = self .id ,
1813- ** kwargs )
1814-
1815- def File (self , id = None , ** kwargs ):
1816- warnings .warn ("`File` is deprecated, use `files` instead" ,
1817- DeprecationWarning )
1818- return ProjectFile ._get_list_or_object (self .gitlab , id ,
1819- project_id = self .id ,
1820- ** kwargs )
1821-
1822- def Hook (self , id = None , ** kwargs ):
1823- warnings .warn ("`Hook` is deprecated, use `hooks` instead" ,
1824- DeprecationWarning )
1825- return ProjectHook ._get_list_or_object (self .gitlab , id ,
1826- project_id = self .id ,
1827- ** kwargs )
1828-
1829- def Key (self , id = None , ** kwargs ):
1830- warnings .warn ("`Key` is deprecated, use `keys` instead" ,
1831- DeprecationWarning )
1832- return ProjectKey ._get_list_or_object (self .gitlab , id ,
1833- project_id = self .id ,
1834- ** kwargs )
1835-
1836- def Issue (self , id = None , ** kwargs ):
1837- warnings .warn ("`Issue` is deprecated, use `issues` instead" ,
1838- DeprecationWarning )
1839- return ProjectIssue ._get_list_or_object (self .gitlab , id ,
1840- project_id = self .id ,
1841- ** kwargs )
1842-
1843- def Label (self , id = None , ** kwargs ):
1844- warnings .warn ("`Label` is deprecated, use `labels` instead" ,
1845- DeprecationWarning )
1846- return ProjectLabel ._get_list_or_object (self .gitlab , id ,
1847- project_id = self .id ,
1848- ** kwargs )
1849-
1850- def Member (self , id = None , ** kwargs ):
1851- warnings .warn ("`Member` is deprecated, use `members` instead" ,
1852- DeprecationWarning )
1853- return ProjectMember ._get_list_or_object (self .gitlab , id ,
1854- project_id = self .id ,
1855- ** kwargs )
1856-
1857- def MergeRequest (self , id = None , ** kwargs ):
1858- warnings .warn (
1859- "`MergeRequest` is deprecated, use `mergerequests` instead" ,
1860- DeprecationWarning )
1861- return ProjectMergeRequest ._get_list_or_object (self .gitlab , id ,
1862- project_id = self .id ,
1863- ** kwargs )
1864-
1865- def Milestone (self , id = None , ** kwargs ):
1866- warnings .warn ("`Milestone` is deprecated, use `milestones` instead" ,
1867- DeprecationWarning )
1868- return ProjectMilestone ._get_list_or_object (self .gitlab , id ,
1869- project_id = self .id ,
1870- ** kwargs )
1871-
1872- def Note (self , id = None , ** kwargs ):
1873- warnings .warn ("`Note` is deprecated, use `notes` instead" ,
1874- DeprecationWarning )
1875- return ProjectNote ._get_list_or_object (self .gitlab , id ,
1876- project_id = self .id ,
1877- ** kwargs )
1878-
1879- def Snippet (self , id = None , ** kwargs ):
1880- warnings .warn ("`Snippet` is deprecated, use `snippets` instead" ,
1881- DeprecationWarning )
1882- return ProjectSnippet ._get_list_or_object (self .gitlab , id ,
1883- project_id = self .id ,
1884- ** kwargs )
1885-
1886- def Tag (self , id = None , ** kwargs ):
1887- warnings .warn ("`Tag` is deprecated, use `tags` instead" ,
1888- DeprecationWarning )
1889- return ProjectTag ._get_list_or_object (self .gitlab , id ,
1890- project_id = self .id ,
1891- ** kwargs )
1892-
18931751 def tree (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- def Member (self , id = None , ** kwargs ):
2370- warnings .warn ("`Member` is deprecated, use `members` instead" ,
2371- DeprecationWarning )
2372- return TeamMember ._get_list_or_object (self .gitlab , id ,
2373- team_id = self .id ,
2374- ** kwargs )
2375-
2376- def Project (self , id = None , ** kwargs ):
2377- warnings .warn ("`Project` is deprecated, use `projects` instead" ,
2378- DeprecationWarning )
2379- return TeamProject ._get_list_or_object (self .gitlab , id ,
2380- team_id = self .id ,
2381- ** kwargs )
2382-
23832227
23842228class TeamManager (BaseManager ):
23852229 obj_cls = Team
0 commit comments