Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Introduce a global setting to always get all element fromlist() calls #2843

Open
Labels
@gdubicki

Description

@gdubicki

Description of the problem

In the gitlabform app (https://github.com/gitlabform/gitlabform), and probably for many other purposes too, we always want to get all the elements of lists.

Current solution

There seem to be 2 options for that when using this library:

a) remember to useget_all=True and probably cause with increased resources use on the GitLab instance,

b) remember to useiterator=True and add extra code to get all the elements of the list,

Both of these require extra code that you need to remember about (because the missing parameter will not cause an error unless you test with lists of > 20 elements) and are inconvenient.

We already had 2 bugs in gitlabform because we forgot to add this code:

Proposed solution

Let's introduce a global configuration flag to get all the elements of each list by default.

We could name this flagget_all_by_default and pass it to the constructor (like the "pagination" parameter now).

This could be implemented with iterators to not cause an extra load in the GitLab instance. The execution time or resource use on the client side is less important here as this would probably be used for scripting, batch operations and generally non-interactive purposes.

Specifications

  • python-gitlab version: v4.4.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): doesn't matter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp