@@ -578,13 +578,6 @@ def _data_for_gitlab(self, extra_parameters={}, update=False):
578
578
self .confirm = str (self .confirm ).lower ()
579
579
return super (User , self )._data_for_gitlab (extra_parameters )
580
580
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
-
588
581
def block (self , ** kwargs ):
589
582
"""Blocks the user."""
590
583
url = '/users/%s/block' % self .id
@@ -687,11 +680,6 @@ class CurrentUser(GitlabObject):
687
680
('keys' , CurrentUserKeyManager , [('user_id' , 'id' )])
688
681
]
689
682
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
-
695
683
696
684
class ApplicationSettings (GitlabObject ):
697
685
_url = '/application/settings'
@@ -805,13 +793,6 @@ class Group(GitlabObject):
805
793
VISIBILITY_INTERNAL = gitlab .VISIBILITY_INTERNAL
806
794
VISIBILITY_PUBLIC = gitlab .VISIBILITY_PUBLIC
807
795
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
-
815
796
def transfer_project (self , id , ** kwargs ):
816
797
"""Transfers a project to this new groups.
817
798
@@ -1222,14 +1203,6 @@ def _data_for_gitlab(self, extra_parameters={}, update=False):
1222
1203
return super (ProjectIssue , self )._data_for_gitlab (extra_parameters ,
1223
1204
update )
1224
1205
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
-
1233
1206
def subscribe (self , ** kwargs ):
1234
1207
"""Subscribe to an issue.
1235
1208
@@ -1396,13 +1369,6 @@ class ProjectMergeRequest(GitlabObject):
1396
1369
managers = [('notes' , ProjectMergeRequestNoteManager ,
1397
1370
[('project_id' , 'project_id' ), ('merge_request_id' , 'id' )])]
1398
1371
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
-
1406
1372
def _data_for_gitlab (self , extra_parameters = {}, update = False ):
1407
1373
data = (super (ProjectMergeRequest , self )
1408
1374
._data_for_gitlab (extra_parameters , update = update ))
@@ -1683,15 +1649,6 @@ def Content(self, **kwargs):
1683
1649
DeprecationWarning )
1684
1650
return self .content ()
1685
1651
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
-
1695
1652
def content (self , streamed = False , action = None , chunk_size = 1024 , ** kwargs ):
1696
1653
"""Return the raw content of a snippet.
1697
1654
@@ -1791,105 +1748,6 @@ class Project(GitlabObject):
1791
1748
VISIBILITY_INTERNAL = gitlab .VISIBILITY_INTERNAL
1792
1749
VISIBILITY_PUBLIC = gitlab .VISIBILITY_PUBLIC
1793
1750
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
-
1893
1751
def tree (self , path = '' , ref_name = '' , ** kwargs ):
1894
1752
warnings .warn ("`tree` is deprecated, use `repository_tree` instead" ,
1895
1753
DeprecationWarning )
@@ -2366,20 +2224,6 @@ class Team(GitlabObject):
2366
2224
('projects' , TeamProjectManager , [('team_id' , 'id' )])
2367
2225
]
2368
2226
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
-
2383
2227
2384
2228
class TeamManager (BaseManager ):
2385
2229
obj_cls = Team
0 commit comments