summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-02-05 14:43:02 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2018-02-05 14:43:02 +0100
commitf276f13df50132554984f989b1d3d6c5fa8cdc01 (patch)
treec59072098988fb284bcfce068d1d81f81b29da44 /docs
parentb4f03173f33ed8d214ddc20b4791ec11677f6bb1 (diff)
downloadgitlab-f276f13df50132554984f989b1d3d6c5fa8cdc01.tar.gz
Default to API v4
Diffstat (limited to 'docs')
-rw-r--r--docs/api-usage.rst12
-rw-r--r--docs/cli.rst6
-rw-r--r--docs/switching-to-v4.rst8
3 files changed, 12 insertions, 14 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst
index 5816b6d..190482f 100644
--- a/docs/api-usage.rst
+++ b/docs/api-usage.rst
@@ -7,7 +7,7 @@ python-gitlab supports both GitLab v3 and v4 APIs.
v3 being deprecated by GitLab, its support in python-gitlab will be minimal.
The development team will focus on v4.
-v3 is still the default API used by python-gitlab, for compatibility reasons.
+v4 is the default API used by python-gitlab since version 1.3.0.
``gitlab.Gitlab`` class
@@ -63,21 +63,19 @@ for a detailed discussion.
API version
===========
-``python-gitlab`` uses the v3 GitLab API by default. Use the ``api_version``
-parameter to switch to v4:
+``python-gitlab`` uses the v4 GitLab API by default. Use the ``api_version``
+parameter to switch to v3:
.. code-block:: python
import gitlab
- gl = gitlab.Gitlab('http://10.0.0.1', 'JVNSESs8EwWRx5yDxM5q', api_version=4)
+ gl = gitlab.Gitlab('http://10.0.0.1', 'JVNSESs8EwWRx5yDxM5q', api_version=3)
.. warning::
The python-gitlab API is not the same for v3 and v4. Make sure to read
- :ref:`switching_to_v4` before upgrading.
-
- v4 will become the default in python-gitlab.
+ :ref:`switching_to_v4` if you are upgrading from v3.
Managers
========
diff --git a/docs/cli.rst b/docs/cli.rst
index 7620349..591761c 100644
--- a/docs/cli.rst
+++ b/docs/cli.rst
@@ -41,7 +41,7 @@ example:
[somewhere]
url = https://some.whe.re
private_token = vTbFeqJYCY3sibBP7BZM
- api_version = 4
+ api_version = 3
[elsewhere]
url = http://else.whe.re:8080
@@ -92,8 +92,8 @@ limited permissions.
- An Oauth token for authentication. The Gitlab server must be configured
to support this authentication method.
* - ``api_version``
- - GitLab API version to use (``3`` or ``4``). Defaults to ``3`` for now,
- but will switch to ``4`` eventually.
+ - GitLab API version to use (``3`` or ``4``). Defaults to ``4`` since
+ version 1.3.0.
* - ``http_username``
- Username for optional HTTP authentication
* - ``http_password``
diff --git a/docs/switching-to-v4.rst b/docs/switching-to-v4.rst
index 217463d..ef21060 100644
--- a/docs/switching-to-v4.rst
+++ b/docs/switching-to-v4.rst
@@ -16,12 +16,12 @@ http://gitlab.com.
Using the v4 API
================
-To use the new v4 API, explicitly define ``api_version` `in the ``Gitlab``
-constructor:
+python-gitlab uses the v4 API by default since the 1.3.0 release. To use the
+old v3 API, explicitly define ``api_version`` in the ``Gitlab`` constructor:
.. code-block:: python
- gl = gitlab.Gitlab(..., api_version=4)
+ gl = gitlab.Gitlab(..., api_version=3)
If you use the configuration file, also explicitly define the version:
@@ -30,7 +30,7 @@ If you use the configuration file, also explicitly define the version:
[my_gitlab]
...
- api_version = 4
+ api_version = 3
Changes between v3 and v4 API