We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GitLab support is broken
`{"error":"API V3 is no longer supported. Use API V4 instead."}`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `liberapay/elsewhere/gitlab.py`
Content:
```
1 from __future__ import absolute_import, division, print_function, unicode_literals
2 
3 from liberapay.elsewhere._base import PlatformOAuth2
4 from liberapay.elsewhere._extractors import key
5 from liberapay.elsewhere._paginators import header_links_paginator
6 
7 
8 class GitLab(PlatformOAuth2):
9 
10     # Platform attributes
11     name = 'gitlab'
12     display_name = 'GitLab'
13     account_url = 'https://gitlab.com/u/{user_name}'
14     repo_url = 'https://gitlab.com/{slug}'
15     has_teams = True
16 
17     # Auth attributes
18     # GitLab uses https://github.com/doorkeeper-gem/doorkeeper
19     auth_url = 'https://gitlab.com/oauth/authorize'
20     access_token_url = 'https://gitlab.com/oauth/token'
21 
22     # can_auth_with_client_credentials = True
23     # https://gitlab.com/gitlab-org/gitlab-ce/issues/13795
24 
25     # API attributes
26     # http://doc.gitlab.com/ce/api/
27     api_format = 'json'
28     api_paginator = header_links_paginator(total_header='X-Total')
29     api_url = 'https://gitlab.com/api/v3'
30     api_user_info_path = '/users/{user_id}'
31     api_user_name_info_path = '/users?username={user_name}'
32     api_user_self_info_path = '/user'
33     api_team_members_path = '/groups/{user_name}/members'
34     api_repos_path = '/projects?owned=true&visibility=public&order_by=last_activity_at&per_page=100'
35     api_starred_path = '/projects?starred=true&visibility=public'
36 
37     # User info extractors
38     x_user_id = key('id')
39     x_user_name = key('username')
40     x_display_name = key('name')
41     x_email = key('email')
42     x_avatar_url = key('avatar_url')
43     x_description = key('bio')
44 
45     # Repo info extractors
46     x_repo_id = key('id')
47     x_repo_name = key('name')
48     x_repo_slug = key('path_with_namespace')
49     x_repo_description = key('description')
50     x_repo_last_update = key('last_activity_at')
51     x_repo_is_fork = key('forked_from_project', clean=bool)
52     x_repo_stars_count = key('star_count')
53     x_repo_owner_id = key('owner', clean=lambda d: d['id'])
54
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/liberapay/elsewhere/gitlab.py b/liberapay/elsewhere/gitlab.py
--- a/liberapay/elsewhere/gitlab.py
+++ b/liberapay/elsewhere/gitlab.py
@@ -26,7 +26,7 @@
     # http://doc.gitlab.com/ce/api/
     api_format = 'json'
     api_paginator = header_links_paginator(total_header='X-Total')
-    api_url = 'https://gitlab.com/api/v3'
+    api_url = 'https://gitlab.com/api/v4'
     api_user_info_path = '/users/{user_id}'
     api_user_name_info_path = '/users?username={user_name}'
     api_user_self_info_path = '/user'

{"golden_diff": "diff --git a/liberapay/elsewhere/gitlab.py b/liberapay/elsewhere/gitlab.py\n--- a/liberapay/elsewhere/gitlab.py\n+++ b/liberapay/elsewhere/gitlab.py\n@@ -26,7 +26,7 @@\n     # http://doc.gitlab.com/ce/api/\n     api_format = 'json'\n     api_paginator = header_links_paginator(total_header='X-Total')\n-    api_url = 'https://gitlab.com/api/v3'\n+    api_url = 'https://gitlab.com/api/v4'\n     api_user_info_path = '/users/{user_id}'\n     api_user_name_info_path = '/users?username={user_name}'\n     api_user_self_info_path = '/user'\n", "issue": "GitLab support is broken\n`{\"error\":\"API V3 is no longer supported. Use API V4 instead.\"}`\n", "before_files": [{"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom liberapay.elsewhere._base import PlatformOAuth2\nfrom liberapay.elsewhere._extractors import key\nfrom liberapay.elsewhere._paginators import header_links_paginator\n\n\nclass GitLab(PlatformOAuth2):\n\n    # Platform attributes\n    name = 'gitlab'\n    display_name = 'GitLab'\n    account_url = 'https://gitlab.com/u/{user_name}'\n    repo_url = 'https://gitlab.com/{slug}'\n    has_teams = True\n\n    # Auth attributes\n    # GitLab uses https://github.com/doorkeeper-gem/doorkeeper\n    auth_url = 'https://gitlab.com/oauth/authorize'\n    access_token_url = 'https://gitlab.com/oauth/token'\n\n    # can_auth_with_client_credentials = True\n    # https://gitlab.com/gitlab-org/gitlab-ce/issues/13795\n\n    # API attributes\n    # http://doc.gitlab.com/ce/api/\n    api_format = 'json'\n    api_paginator = header_links_paginator(total_header='X-Total')\n    api_url = 'https://gitlab.com/api/v3'\n    api_user_info_path = '/users/{user_id}'\n    api_user_name_info_path = '/users?username={user_name}'\n    api_user_self_info_path = '/user'\n    api_team_members_path = '/groups/{user_name}/members'\n    api_repos_path = '/projects?owned=true&visibility=public&order_by=last_activity_at&per_page=100'\n    api_starred_path = '/projects?starred=true&visibility=public'\n\n    # User info extractors\n    x_user_id = key('id')\n    x_user_name = key('username')\n    x_display_name = key('name')\n    x_email = key('email')\n    x_avatar_url = key('avatar_url')\n    x_description = key('bio')\n\n    # Repo info extractors\n    x_repo_id = key('id')\n    x_repo_name = key('name')\n    x_repo_slug = key('path_with_namespace')\n    x_repo_description = key('description')\n    x_repo_last_update = key('last_activity_at')\n    x_repo_is_fork = key('forked_from_project', clean=bool)\n    x_repo_stars_count = key('star_count')\n    x_repo_owner_id = key('owner', clean=lambda d: d['id'])\n", "path": "liberapay/elsewhere/gitlab.py"}], "after_files": [{"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom liberapay.elsewhere._base import PlatformOAuth2\nfrom liberapay.elsewhere._extractors import key\nfrom liberapay.elsewhere._paginators import header_links_paginator\n\n\nclass GitLab(PlatformOAuth2):\n\n    # Platform attributes\n    name = 'gitlab'\n    display_name = 'GitLab'\n    account_url = 'https://gitlab.com/u/{user_name}'\n    repo_url = 'https://gitlab.com/{slug}'\n    has_teams = True\n\n    # Auth attributes\n    # GitLab uses https://github.com/doorkeeper-gem/doorkeeper\n    auth_url = 'https://gitlab.com/oauth/authorize'\n    access_token_url = 'https://gitlab.com/oauth/token'\n\n    # can_auth_with_client_credentials = True\n    # https://gitlab.com/gitlab-org/gitlab-ce/issues/13795\n\n    # API attributes\n    # http://doc.gitlab.com/ce/api/\n    api_format = 'json'\n    api_paginator = header_links_paginator(total_header='X-Total')\n    api_url = 'https://gitlab.com/api/v4'\n    api_user_info_path = '/users/{user_id}'\n    api_user_name_info_path = '/users?username={user_name}'\n    api_user_self_info_path = '/user'\n    api_team_members_path = '/groups/{user_name}/members'\n    api_repos_path = '/projects?owned=true&visibility=public&order_by=last_activity_at&per_page=100'\n    api_starred_path = '/projects?starred=true&visibility=public'\n\n    # User info extractors\n    x_user_id = key('id')\n    x_user_name = key('username')\n    x_display_name = key('name')\n    x_email = key('email')\n    x_avatar_url = key('avatar_url')\n    x_description = key('bio')\n\n    # Repo info extractors\n    x_repo_id = key('id')\n    x_repo_name = key('name')\n    x_repo_slug = key('path_with_namespace')\n    x_repo_description = key('description')\n    x_repo_last_update = key('last_activity_at')\n    x_repo_is_fork = key('forked_from_project', clean=bool)\n    x_repo_stars_count = key('star_count')\n    x_repo_owner_id = key('owner', clean=lambda d: d['id'])\n", "path": "liberapay/elsewhere/gitlab.py"}]}