From 3ee3aa632a57c2274fe1bc8c29e0685456d88855 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Wed, 4 Oct 2023 10:27:28 +0100 Subject: [PATCH] Fix deprecation warnings on list() calls --- gitlab_deps/deps.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gitlab_deps/deps.py b/gitlab_deps/deps.py index 1839e75..de7b44d 100644 --- a/gitlab_deps/deps.py +++ b/gitlab_deps/deps.py @@ -14,10 +14,9 @@ def split_project_branch(project_with_branch): def list_projects(gl, search_pattern): projects = gl.projects.list( - all=True, search=search_pattern, search_namespaces=True, - as_list=False, + iterator=True, simple=True, archived=False, ) @@ -29,7 +28,7 @@ def get_branches(gl, project_names): for path_with_namespace in project_names: p = gl.projects.get(path_with_namespace) try: - branches = p.branches.list() + branches = p.branches.list(iterator=True) except Exception as e: logging.error('error getting branches for %s: %s', path_with_namespace, e) -- GitLab