Skip to content

Commit 24c283f

Browse files
author
Gauvain Pocentek
committed
Deprecate Project.archive()
1 parent 45adb6e commit 24c283f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

gitlab/objects.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,14 @@ def repository_contributors(self):
15561556
raise_error_from_response(r, GitlabListError)
15571557
return r.json()
15581558

1559+
15591560
def archive(self, sha=None, **kwargs):
1561+
warnings.warn("`archive` is deprecated, "
1562+
"use `repository_archive` instead",
1563+
DeprecationWarning)
1564+
return self.repository_archive(path, ref_name, **kwargs)
1565+
1566+
def repository_archive(self, sha=None, **kwargs):
15601567
"""Return a tarball of the repository.
15611568
15621569
Args:

tools/python_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@
152152
assert(tree[0]['name'] == 'README.rst')
153153
blob = admin_project.repository_blob('master', 'README.rst')
154154
assert(blob == 'Initial content')
155-
archive1 = admin_project.archive()
156-
archive2 = admin_project.archive('master')
155+
archive1 = admin_project.repository_archive()
156+
archive2 = admin_project.repository_archive('master')
157157
assert(archive1 == archive2)
158158

159159
# labels

0 commit comments

Comments
 (0)