Skip to content

Commit

Permalink
Revert "feat: use keyset pagination by default for all=True"
Browse files Browse the repository at this point in the history
  • Loading branch information
max-wittig committed Mar 9, 2020
1 parent 6c5458a commit 6f843b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
6 changes: 1 addition & 5 deletions docs/api-usage.rst
Expand Up @@ -204,11 +204,6 @@ listing methods support the ``page`` and ``per_page`` parameters:
By default GitLab does not return the complete list of items. Use the ``all``
parameter to get all the items when using listing methods:

.. warning::

The all=True option uses keyset pagination by default if order_by is not supplied,
or if order_by="id".

.. code-block:: python
all_groups = gl.groups.list(all=True)
Expand Down Expand Up @@ -408,3 +403,4 @@ parameter to that API invocation:
gl = gitlab.gitlab(url, token, api_version=4)
gl.projects.import_github(ACCESS_TOKEN, 123456, "root", timeout=120.0)
6 changes: 0 additions & 6 deletions gitlab/__init__.py
Expand Up @@ -641,12 +641,6 @@ def http_list(self, path, query_data=None, as_list=None, **kwargs):
get_all = kwargs.pop("all", False)
url = self._build_url(path)

# use keyset pagination automatically, if all=True
order_by = kwargs.get("order_by")
if get_all and (not order_by or order_by == "id"):
kwargs["pagination"] = "keyset"
kwargs["order_by"] = "id"

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

Expand Down

0 comments on commit 6f843b6

Please sign in to comment.