File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 22Getting started with the API
33############################
44
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.
116
127``gitlab.Gitlab `` class
138=======================
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ Create a commit::
4040 # See https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions
4141 # for actions detail
4242 data = {
43- 'branch_name': 'master', # v3
44- 'branch': 'master', # v4
43+ 'branch': 'master',
4544 'commit_message': 'blah blah blah',
4645 'actions': [
4746 {
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``
88provides support for this new version, but the python API has been modified to
99solve some problems with the existing one.
1010
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
1212to v4 if you use a recent version of GitLab (>= 9.0), or if you use
1313https://gitlab.com.
1414
1515
1616Using the v4 API
1717================
1818
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:
2124
2225.. code-block :: python
2326
2427 gl = gitlab.Gitlab(... , api_version = 3 )
2528
26-
27- If you use the configuration file, also explicitly define the version:
28-
2929 .. code-block :: ini
3030
3131 [my_gitlab]
You can’t perform that action at this time.
0 commit comments