10000 Merge branch 'master' into dataframeclient_chunked_queries · spott/influxdb-python@0031560 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0031560

Browse files
authored
Merge branch 'master' into dataframeclient_chunked_queries
2 parents bce3c5a + 3edc763 commit 0031560

File tree

8 files changed

+28
-26
lines changed

8 files changed

+28
-26
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ matrix:
1616
env: TOX_ENV=pypy
1717
- python: 3.4
1818
env: TOX_ENV=py34
19-
# An issue in travis-ci prevents this case from running
20-
# Link to issue: https://github.com/travis-ci/travis-ci/issues/6304
21-
# - python: pypy3.3-5.2-alpha1
22-
# env: TOX_ENV=pypy3
23-
- python: 3.4
19+
- python: 3.5
20+
env: TOX_ENV=py35
21+
- python: 3.6
22+
env: TOX_ENV=py36
23+
- python: 3.6
2424
env: TOX_ENV=docs
25-
- python: 3.4
25+
- python: 3.6
2626
env: TOX_ENV=flake8
27-
- python: 3.4
27+
- python: 3.6
2828
env: TOX_ENV=coverage
2929

3030
install:
3131
- pip install tox
3232
- pip install coveralls
3333
- mkdir influxdb_install
34-
- wget https://dl.influxdata.com/influxdb/releases/influxdb_1.1.0_amd64.deb
34+
- wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.4_amd64.deb
3535
- dpkg -x influxdb*.deb influxdb_install
3636
script:
3737
- export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd

dev-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
requests
1+
requests>=2.17.0
22
nose
33
mock
4-
pandas
4+
pandas==0.20.1
55
Sphinx==1.5.5
66
sphinx_rtd_theme
77
wheel

examples/tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def main(host='localhost', port=8086):
4141
print("Write points: {0}".format(json_body))
4242
client.write_points(json_body)
4343

44-
print("Queying data: " + query)
44+
print("Querying data: " + query)
4545
result = client.query(query)
4646

4747
print("Result: {0}".format(result))

influxdb/_dataframe_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ def _convert_dataframe_to_json(self,
184184
if not isinstance(dataframe, pd.DataFrame):
185185
raise TypeError('Must be DataFrame, but type was: {0}.'
186186
.format(type(dataframe)))
187-
if not (isinstance(dataframe.index, pd.tseries.period.PeriodIndex) or
188-
isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)):
187+
if not (isinstance(dataframe.index, pd.PeriodIndex) or
188+
isinstance(dataframe.index, pd.DatetimeIndex)):
189189
raise TypeError('Must be DataFrame with DatetimeIndex or \
190190
PeriodIndex.')
191191

@@ -241,8 +241,8 @@ def _convert_dataframe_to_lines(self,
241241
if not isinstance(dataframe, pd.DataFrame):
242242
raise TypeError('Must be DataFrame, but type was: {0}.'
243243
.format(type(dataframe)))
244-
if not (isinstance(dataframe.index, pd.tseries.period.PeriodIndex) or
245-
isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)):
244+
if not (isinstance(dataframe.index, pd.PeriodIndex) or
245+
isinstance(dataframe.index, pd.DatetimeIndex)):
246246
raise TypeError('Must be DataFrame with DatetimeIndex or \
247247
PeriodIndex.')
248248

@@ -286,7 +286,7 @@ def _convert_dataframe_to_lines(self,
286286
}.get(time_precision, 1)
287287

288288
# Make array of timestamp ints
289-
if isinstance(dataframe.index, pd.tseries.period.PeriodIndex):
289+
if isinstance(dataframe.index, pd.PeriodIndex):
290290
time = ((dataframe.index.to_timestamp().values.astype(int) /
291291
precision_factor).astype(int).astype(str))
292292
else:

influxdb/influxdb08/dataframe_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ def _convert_dataframe_to_json(self, dataframe, name, time_precision='s'):
128128
if not isinstance(dataframe, pd.DataFrame):
129129
raise TypeError('Must be DataFrame, but type was: {0}.'
130130
.format(type(dataframe)))
131-
if not (isinstance(dataframe.index, pd.tseries.period.PeriodIndex) or
132-
isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)):
131+
if not (isinstance(dataframe.index, pd.PeriodIndex) or
132+
isinstance(dataframe.index, pd.DatetimeIndex)):
133133
raise TypeError('Must be DataFrame with DatetimeIndex or \
134134
PeriodIndex.')
135135

136-
if isinstance(dataframe.index, pd.tseries.period.PeriodIndex):
136+
if isinstance(dataframe.index, pd.PeriodIndex):
137137
dataframe.index = dataframe.index.to_timestamp()
138138
else:
139139
dataframe.index = pd.to_datetime(dataframe.index)

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python-dateutil>=2.0.0
1+
python-dateutil>=2.6.0
22
pytz
3-
requests>=1.0.3
4-
six>=1.9.0
3+
requests>=2.17.0
4+
six>=1.10.0

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
'Programming Language :: Python',
5050
'Programming Language :: Python :: 2.7',
5151
'Programming Language :: Python :: 3',
52-
'Programming Language :: Python :: 3.3',
52+
'Programming Language :: Python :: 3.4',
53+
'Programming Language :: Python :: 3.5',
54+
'Programming Language :: Python :: 3.6',
5355
'Topic :: Software Development :: Libraries',
5456
'Topic :: Software Development :: Libraries :: Python Modules',
5557
),

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[tox]
2-
envlist = py27, py34, pypy, pypy3, flake8, coverage, docs
2+
envlist = py27, py34, py35, py36, pypy, pypy3, flake8, coverage, docs
33

44
[testenv]
55
passenv = INFLUXDB_PYTHON_INFLUXD_PATH
66
setenv = INFLUXDB_PYTHON_SKIP_SERVER_TESTS=False
77
deps = -r{toxinidir}/requirements.txt
88
-r{toxinidir}/test-requirements.txt
9-
py27,py34: pandas
9+
py27,py34,py35,py36: pandas==0.20.1
1010
# Only install pandas with non-pypy interpreters
1111
commands = nosetests -v --with-doctest {posargs}
1212

@@ -25,7 +25,7 @@ commands = nosetests -v --with-coverage --cover-html --cover-package=influxdb
2525

2626
[testenv:docs]
2727
deps = -r{toxinidir}/requirements.txt
28-
pandas
28+
pandas==0.20.1
2929
Sphinx==1.5.5
3030
sphinx_rtd_theme
3131
commands = sphinx-build -b html docs/source docs/build

0 commit comments

Comments
 (0)
0