Skip to content

Commit 3f585ad

Browse files
Merge pull request #1115 from python-gitlab/fix/keyset-pagination-revert
Fix/keyset pagination revert
2 parents 1f7dbc8 + 870e7ea commit 3f585ad

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

gitlab/__init__.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from gitlab import utils # noqa
3030

3131
__title__ = "python-gitlab"
32-
__version__ = "2.3.0"
32+
__version__ = "2.3.1"
3333
__author__ = "Gauvain Pocentek"
3434
__email__ = "gauvainpocentek@gmail.com"
3535
__license__ = "LGPL3"
@@ -643,17 +643,7 @@ def http_list(self, path, query_data=None, as_list=None, **kwargs):
643643
get_all = kwargs.pop("all", False)
644644
url = self._build_url(path)
645645

646-
order_by = kwargs.get("order_by")
647-
pagination = kwargs.get("pagination")
648646
page = kwargs.get("page")
649-
if (
650-
path in ALLOWED_KEYSET_ENDPOINTS
651-
and (not order_by or order_by == "id")
652-
and (not pagination or pagination == "keyset")
653-
and not page
654-
):
655-
kwargs["pagination"] = "keyset"
656-
kwargs["order_by"] = "id"
657647

658648
if get_all is True and as_list is True:
659649
return list(GitlabList(self, url, query_data, **kwargs))

tools/python_test_v4.py

+1
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@
421421

422422
assert len(gl.projects.list(owned=True)) == 2
423423
assert len(gl.projects.list(search="admin")) == 1
424+
assert len(gl.projects.list(as_list=False)) == 4
424425

425426
# test pagination
426427
l1 = gl.projects.list(per_page=1, page=1)

0 commit comments

Comments
 (0)