python-influxdb/influxdb-pr845-pandas-future.patch
Dirk Mueller 7b7236187a Accepting request 1128636 from home:bnavigator:branches:devel:languages:python
- Update python-influxdb-new-pandas.patch in order to avoid
  FutureWarning: does not work with pandas < 2.1
- Make pure python a noarch package
- PEP 517
- Upstream is archived, but still required by
  openSUSE-release-tools gh#openSUSE/openSUSE-release-tools#3034

OBS-URL: https://build.opensuse.org/request/show/1128636
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-influxdb?expand=0&rev=36
2023-11-25 22:45:13 +00:00

23 lines
905 B
Diff

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()
)
]