From c24e7c99082a3af3ca578f9a55be0bca99ea1011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Tue, 29 Apr 2014 11:52:02 +0200 Subject: [PATCH] Better phrasing of th compatibility warning. Thanks, karmi! --- README.rst | 29 +++++++++++++++++++++-------- docs/api.rst | 4 ++-- docs/index.rst | 22 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 44c22b4f..d4a881cc 100644 --- a/README.rst +++ b/README.rst @@ -5,21 +5,34 @@ Official low-level client for Elasticsearch. It's goal is to provide common ground for all Elasticsearch-related code in Python; because of this it tries to be opinion-free and very extendable. -Versioning ----------- +Compatibility +------------- -There are two branches for development - `master` and `0.4`. Master branch is -used to track all the changes for Elasticsearch 1.0 and beyond whereas 0.4 -tracks Elasticsearch 0.90. +The library is compatible with both Elasticsearch 1.x and 0.90.x but you +**have to use a matching version**. -Releases with major version 1 (1.X.Y) are to be used with Elasticsearch 1.0 and -later, 0.4 releases are meant to work with Elasticsearch 0.90.X. +For **Elasticsearch 1.0** and later, use the major version 1 (``1.x.y``) of the +library. + +For **Elasticsearch 0.90.x**, use a version from ``0.4.x`` releases of the +library. + +The recommended way to set your requirements in your `setup.py` or +`requirements.txt` is:: + + # Elasticsearch 1.0 + elasticsearch>=1.0.0,<2.0.0 + + # Elasticsearch 0.90 + elasticsearch<1.0.0 + +The development is happening on ``master`` and ``0.4`` branches, respectively. Installation ------------ -Install the `elasticsearch` package with `pip +Install the ``elasticsearch`` package with `pip `_:: pip install elasticsearch diff --git a/docs/api.rst b/docs/api.rst index 76d92743..44751bd0 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -6,8 +6,8 @@ API Documentation All the API calls map the raw REST api as closely as possible, including the distinction between required and optional arguments to the calls. This means that the code makes distinction between positional and keyword arguments; we, -however, recommend that people *use keyword arguments for all calls for -consistency and safety*. +however, recommend that people **use keyword arguments for all calls for +consistency and safety**. An API call is considered successful (and will return a response) if elasticsearch returns a 2XX response. Otherwise an instance of diff --git a/docs/index.rst b/docs/index.rst index f73234a5..a9c869fb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,6 +5,28 @@ Official low-level client for Elasticsearch. It's goal is to provide common ground for all Elasticsearch-related code in Python; because of this it tries to be opinion-free and very extendable. +Compatibility +------------- + +The library is compatible with both Elasticsearch 1.x and 0.90.x but you +**have to use a matching version**. + +For **Elasticsearch 1.0** and later, use the major version 1 (``1.x.y``) of the +library. + +For **Elasticsearch 0.90.x**, use a version from ``0.4.x`` releases of the +library. + +The recommended way to set your requirements in your `setup.py` or +`requirements.txt` is:: + + # Elasticsearch 1.0 + elasticsearch>=1.0.0,<2.0.0 + + # Elasticsearch 0.90 + elasticsearch<1.0.0 + +The development is happening on ``master`` and ``0.4`` branches, respectively. Example Usage -------------