File tree 3 files changed +8
-14
lines changed
3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 2
2
Getting started with the API
3
3
############################
4
4
5
- python-gitlab supports both GitLab v3 and v4 APIs.
6
-
7
- .. note ::
8
-
9
- To use the v3 make sure to install python-gitlab 1.4. Only the v4 API is
10
- documented here. See the documentation of earlier versions for the v3 API.
5
+ python-gitlab only supports GitLab APIs v4.
11
6
12
7
``gitlab.Gitlab `` class
13
8
=======================
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ Create a commit::
40
40
# See https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
41
41
# for actions detail
42
42
data = {
43
- 'branch_name': 'master', # v3
44
- 'branch': 'master', # v4
43
+ 'branch': 'master',
45
44
'commit_message': 'blah blah blah',
46
45
'actions': [
47
46
{
Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ GitLab provides a new API version (v4) since its 9.0 release. ``python-gitlab``
8
8
provides support for this new version, but the python API has been modified to
9
9
solve some problems with the existing one.
10
10
11
- GitLab will stop supporting the v3 API soon , and you should consider switching
11
+ GitLab does not support the v3 API anymore , and you should consider switching
12
12
to v4 if you use a recent version of GitLab (>= 9.0), or if you use
13
13
https://gitlab.com.
14
14
15
15
16
16
Using the v4 API
17
17
================
18
18
19
- python-gitlab uses the v4 API by default since the 1.3.0 release. To use the
20
- old v3 API, explicitly define ``api_version `` in the ``Gitlab `` constructor:
19
+ python-gitlab uses the v4 API by default since the 1.3.0 release. If you are
20
+ migrating from an older release, make sure that you remove the ``api_version ``
21
+ definition in you constructors and configuration file:
22
+
23
+ The following examples are **not valid ** anymore:
21
24
22
25
.. code-block :: python
23
26
24
27
gl = gitlab.Gitlab(... , api_version = 3 )
25
28
26
-
27
- If you use the configuration file, also explicitly define the version:
28
-
29
29
.. code-block :: ini
30
30
31
31
[my_gitlab]
You can’t perform that action at this time.
0 commit comments