From ae2a3c71c11d9b58a6538195b4282cee1d76bdb9 Mon Sep 17 00:00:00 2001
From: Matthew McGinn <mamcgi@gmail.com>
Date: Sun, 1 Jul 2018 16:14:40 -0400
Subject: [PATCH 1/2] Enable testing for InfluxDB v1.3.9, v1.4.2, and v1.5.4
 (tsi)

Swap admin_port config for global_port config
---
 .travis.yml                                        | 6 +++---
 CHANGELOG.md                                       | 2 ++
 README.rst                                         | 3 +--
 influxdb/tests/server_tests/influxdb.conf.template | 7 +++----
 influxdb/tests/server_tests/influxdb_instance.py   | 6 +++---
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index da25d8ea..a5fc1831 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,9 +8,9 @@ python:
 
 env:
   - INFLUXDB_VER=1.2.4
-#  - INFLUXDB_VER=1.3.9
-#  - INFLUXDB_VER=1.4.2
-#  - INFLUXDB_VER=1.5.4
+  - INFLUXDB_VER=1.3.9
+  - INFLUXDB_VER=1.4.2
+  - INFLUXDB_VER=1.5.4
 
 addons:
   apt:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe7c5b9b..0791c2ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 - Finally add a CHANGELOG.md to communicate breaking changes (#598)
 - Test multiple versions of InfluxDB in travis
 ### Changed
+- Update test suite to support InfluxDB v1.3.9, v1.4.2, and v1.5.4
 - Fix performance degradation when removing NaN values via line protocol (#592)
 ### Removed
+- Dropped support for Python3.4
 
 ## [v5.1.0] - 2018-06-26
 ### Added
diff --git a/README.rst b/README.rst
index 65e000f8..af7c50d0 100644
--- a/README.rst
+++ b/README.rst
@@ -39,8 +39,7 @@ InfluxDB is an open-source distributed time series database, find more about Inf
 InfluxDB pre v1.1.0 users
 -------------------------
 
-This module is tested with InfluxDB v1.2.4, our recommended version. Though there have been v1.3 (initial TSI branch) and v1.4 releases these are not 
-yet supported. 
+This module is tested with Python {2.7,3.5,3.6} and InfluxDB v{1.2.4,1.3.9,1.4.2,1.5.4}.
 
 Those users still on InfluxDB v0.8.x users may still use the legacy client by importing ``from influxdb.influxdb08 import InfluxDBClient``.
 
diff --git a/influxdb/tests/server_tests/influxdb.conf.template b/influxdb/tests/server_tests/influxdb.conf.template
index 9a289635..efcff78a 100644
--- a/influxdb/tests/server_tests/influxdb.conf.template
+++ b/influxdb/tests/server_tests/influxdb.conf.template
@@ -1,3 +1,5 @@
+bind-address = ":{global_port}"
+
 [meta]
   dir = "{meta_dir}"
   hostname = "localhost"
@@ -6,10 +8,7 @@
 [data]
   dir = "{data_dir}"
   wal-dir = "{wal_dir}"
-
-[admin]
-  enabled = true
-  bind-address = ":{admin_port}"
+  index-version = "tsi1"
 
 [http]
   enabled = true
diff --git a/influxdb/tests/server_tests/influxdb_instance.py b/influxdb/tests/server_tests/influxdb_instance.py
index 21e20fde..1dcd7567 100644
--- a/influxdb/tests/server_tests/influxdb_instance.py
+++ b/influxdb/tests/server_tests/influxdb_instance.py
@@ -80,7 +80,7 @@ def _start_server(self, conf_template, udp_enabled):
         # find a couple free ports :
         free_ports = get_free_ports(4)
         ports = {}
-        for service in 'http', 'admin', 'meta', 'udp':
+        for service in 'http', 'global', 'meta', 'udp':
             ports[service + '_port'] = free_ports.pop()
         if not udp_enabled:
             ports['udp_port'] = -1
@@ -113,7 +113,7 @@ def _start_server(self, conf_template, udp_enabled):
             "%s > Started influxdb bin in %r with ports %s and %s.." % (
                 datetime.datetime.now(),
                 self.temp_dir_base,
-                self.admin_port,
+                self.global_port,
                 self.http_port
             )
         )
@@ -126,7 +126,7 @@ def _start_server(self, conf_template, udp_enabled):
         try:
             while time.time() < timeout:
                 if (is_port_open(self.http_port) and
-                        is_port_open(self.admin_port)):
+                        is_port_open(self.global_port)):
                     # it's hard to check if a UDP port is open..
                     if udp_enabled:
                         # so let's just sleep 0.5 sec in this case

From 4fea43ee6c84b683a06bb63e2c37cab899e04f83 Mon Sep 17 00:00:00 2001
From: Matthew McGinn <mamcgi@gmail.com>
Date: Tue, 3 Jul 2018 20:29:02 -0400
Subject: [PATCH 2/2] Add back PyPy3, remove references to Python 3.4

---
 .travis.yml | 1 +
 README.rst  | 6 +++---
 tox.ini     | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a5fc1831..7f3d4a5d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,7 @@ python:
   - "3.5"
   - "3.6"
   - "pypy-5.3.1"
+  - "pypy3"
 
 env:
   - INFLUXDB_VER=1.2.4
diff --git a/README.rst b/README.rst
index af7c50d0..d4f9611c 100644
--- a/README.rst
+++ b/README.rst
@@ -39,7 +39,7 @@ InfluxDB is an open-source distributed time series database, find more about Inf
 InfluxDB pre v1.1.0 users
 -------------------------
 
-This module is tested with Python {2.7,3.5,3.6} and InfluxDB v{1.2.4,1.3.9,1.4.2,1.5.4}.
+This module is tested with InfluxDB versions: v1.2.4, v1.3.9, v1.4.2, and v1.5.4.
 
 Those users still on InfluxDB v0.8.x users may still use the legacy client by importing ``from influxdb.influxdb08 import InfluxDBClient``.
 
@@ -59,9 +59,9 @@ On Debian/Ubuntu, you can install it with this command::
 Dependencies
 ------------
 
-The influxdb-python distribution is supported and tested on Python 2.7, 3.4, 3.5, 3.6, PyPy and PyPy3.
+The influxdb-python distribution is supported and tested on Python 2.7, 3.5, 3.6, PyPy and PyPy3.
 
-**Note:** Python 3.2 and 3.3 are currently untested. See ``.travis.yml``.
+**Note:** Python <3.5 are currently untested. See ``.travis.yml``.
 
 Main dependency is:
 
diff --git a/tox.ini b/tox.ini
index 5c54d680..d0d87fec 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py27, py34, py35, py36, pypy, pypy3, flake8, pep257, coverage, docs
+envlist = py27, py35, py36, pypy, pypy3, flake8, pep257, coverage, docs
 
 [testenv]
 passenv = INFLUXDB_PYTHON_INFLUXD_PATH