File influxdb-pr845-pandas-future.patch of Package python-influxdb

From db0714de2350493a1776ca4d4d9b743695d68576 Mon Sep 17 00:00:00 2001
From: Christopher Head <chead@chead.ca>
Date: Sat, 22 Aug 2020 11:15:33 -0700
Subject: [PATCH] Fix FutureWarning from pandas

---
 influxdb/_dataframe_client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: influxdb-5.3.1/influxdb/_dataframe_client.py
===================================================================
--- influxdb-5.3.1.orig/influxdb/_dataframe_client.py
+++ influxdb-5.3.1/influxdb/_dataframe_client.py
@@ -305,7 +305,7 @@ class DataFrameClient(InfluxDBClient):
              'time': np.int64(ts.value / precision_factor)}
             for ts, tag, (_, rec) in zip(
                 dataframe.index,
-                dataframe[tag_columns].to_dict('record'),
+                dataframe[tag_columns].to_dict('records'),
                 dataframe[field_columns].iterrows()
             )
         ]
Index: influxdb-5.3.1/influxdb/tests/dataframe_client_test.py
===================================================================
--- influxdb-5.3.1.orig/influxdb/tests/dataframe_client_test.py
+++ influxdb-5.3.1/influxdb/tests/dataframe_client_test.py
@@ -334,7 +334,7 @@ class TestDataFrameClient(unittest.TestC
                 ['some', "2", 2, None],               # skip None
                 ['', "2", 2, None],                   # all tags empty
             ],
-            index=pd.period_range(now, freq='H', periods=5),
+            index=pd.period_range(now, freq='h', periods=5),
             columns=["tag_one", "column_one", "column_two", "tag_three"]
         )
 
openSUSE Build Service is sponsored by