Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

updating deps for py27, including pandas #457

Merged
merged 1 commit into from
Jun 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ install:
- pip install tox
- pip install coveralls
- mkdir influxdb_install
- wget https://dl.influxdata.com/influxdb/releases/influxdb_1.1.0_amd64.deb
- wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.4_amd64.deb
- dpkg -x influxdb*.deb influxdb_install
script:
- export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd
Expand Down
10 changes: 5 additions & 5 deletions influxdb/_dataframe_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def _convert_dataframe_to_json(self,
if not isinstance(dataframe, pd.DataFrame):
raise TypeError('Must be DataFrame, but type was: {0}.'
.format(type(dataframe)))
if not (isinstance(dataframe.index, pd.tseries.period.PeriodIndex) or
isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)):
if not (isinstance(dataframe.index, pd.PeriodIndex) or
isinstance(dataframe.index, pd.DatetimeIndex)):
raise TypeError('Must be DataFrame with DatetimeIndex or \
PeriodIndex.')

Expand Down Expand Up @@ -234,8 +234,8 @@ def _convert_dataframe_to_lines(self,
if not isinstance(dataframe, pd.DataFrame):
raise TypeError('Must be DataFrame, but type was: {0}.'
.format(type(dataframe)))
if not (isinstance(dataframe.index, pd.tseries.period.PeriodIndex) or
isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)):
if not (isinstance(dataframe.index, pd.PeriodIndex) or
isinstance(dataframe.index, pd.DatetimeIndex)):
raise TypeError('Must be DataFrame with DatetimeIndex or \
PeriodIndex.')

Expand Down Expand Up @@ -279,7 +279,7 @@ def _convert_dataframe_to_lines(self,
}.get(time_precision, 1)

# Make array of timestamp ints
if isinstance(dataframe.index, pd.tseries.period.PeriodIndex):
if isinstance(dataframe.index, pd.PeriodIndex):
time = ((dataframe.index.to_timestamp().values.astype(int) /
precision_factor).astype(int).astype(str))
else:
Expand Down
6 changes: 3 additions & 3 deletions influxdb/influxdb08/dataframe_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ def _convert_dataframe_to_json(self, dataframe, name, time_precision='s'):
if not isinstance(dataframe, pd.DataFrame):
raise TypeError('Must be DataFrame, but type was: {0}.'
.format(type(dataframe)))
if not (isinstance(dataframe.index, pd.tseries.period.PeriodIndex) or
isinstance(dataframe.index, pd.tseries.index.DatetimeIndex)):
if not (isinstance(dataframe.index, pd.PeriodIndex) or
isinstance(dataframe.index, pd.DatetimeIndex)):
raise TypeError('Must be DataFrame with DatetimeIndex or \
PeriodIndex.')

if isinstance(dataframe.index, pd.tseries.period.PeriodIndex):
if isinstance(dataframe.index, pd.PeriodIndex):
dataframe.index = dataframe.index.to_timestamp()
else:
dataframe.index = pd.to_datetime(dataframe.index)
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python-dateutil>=2.0.0
python-dateutil>=2.6.0
pytz
requests>=1.0.3
six>=1.9.0
requests>=2.17.0
six>=1.10.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
),
Expand Down