Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-influxdb for openSUSE:Factory 
checked in at 2023-06-19 22:50:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-influxdb (Old)
 and      /work/SRC/openSUSE:Factory/.python-influxdb.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-influxdb"

Mon Jun 19 22:50:46 2023 rev:12 rq:1093763 version:5.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-influxdb/python-influxdb.changes  
2023-06-05 18:07:03.247291842 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-influxdb.new.15902/python-influxdb.changes   
    2023-06-19 22:50:58.861709240 +0200
@@ -1,0 +2,6 @@
+Mon Jun 19 08:47:41 UTC 2023 - Fabian Vogt <[email protected]>
+
+- Add patch to fix tests with newer pandas:
+  * python-influxdb-new-pandas.patch
+
+-------------------------------------------------------------------

New:
----
  python-influxdb-new-pandas.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-influxdb.spec ++++++
--- /var/tmp/diff_new_pack.CWDDWC/_old  2023-06-19 22:50:59.465712776 +0200
+++ /var/tmp/diff_new_pack.CWDDWC/_new  2023-06-19 22:50:59.469712800 +0200
@@ -32,6 +32,8 @@
 Patch1:         
https://github.com/influxdata/influxdb-python/pull/845.patch#/influxdb-pr845-pandas-future.patch
 # do not require six (repo archived in favour of influxdb2, not reporting)
 Patch2:         python-influxdb-no-six.patch
+# fix tests with newer pandas
+Patch3:         python-influxdb-new-pandas.patch
 BuildRequires:  %{python_module python-dateutil >= 2.6.0}
 BuildRequires:  %{python_module pytz}
 BuildRequires:  %{python_module requests >= 2.17.0}

++++++ python-influxdb-new-pandas.patch ++++++
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
@@ -19,7 +19,10 @@ from .client_test import _mocked_session
 
 if not using_pypy:
     import pandas as pd
-    from pandas.util.testing import assert_frame_equal
+    try:
+        from pandas.testing import assert_frame_equal
+    except ImportError:
+        from pandas.util.testing import assert_frame_equal
     from influxdb import DataFrameClient
     import numpy as np
 
@@ -947,7 +950,7 @@ class TestDataFrameClient(unittest.TestC
             index=pd.to_datetime([
                 "2015-01-29 21:55:43.702900257+0000",
                 "2015-01-29 21:55:43.702900257+0000",
-                "2015-06-11 20:46:02+0000"]))
+                "2015-06-11 20:46:02+0000"], format='ISO8601'))
         if pd1.index.tzinfo is None:
             pd1.index = pd1.index.tz_localize('UTC')
         pd2 = pd.DataFrame(
@@ -1008,7 +1011,7 @@ class TestDataFrameClient(unittest.TestC
             index=pd.to_datetime([
                 "2015-01-29 21:55:43.702900257+0000",
                 "2015-01-29 21:55:43.702900257+0000",
-                "2015-06-11 20:46:02+0000"]))
+                "2015-06-11 20:46:02+0000"], format='ISO8601'))
 
         if pd1.index.tzinfo is None:
             pd1.index = pd1.index.tz_localize('UTC')
@@ -1019,7 +1022,7 @@ class TestDataFrameClient(unittest.TestC
             index=pd.to_datetime([
                 "2015-01-29 21:55:43.702900257+0000",
                 "2015-01-29 21:55:43.702900257+0000",
-                "2015-06-11 20:46:02+0000"]))
+                "2015-06-11 20:46:02+0000"], format='ISO8601'))
 
         if pd1_dropna.index.tzinfo is None:
             pd1_dropna.index = pd1_dropna.index.tz_localize('UTC')
Index: influxdb-5.3.1/influxdb/tests/influxdb08/dataframe_client_test.py
===================================================================
--- influxdb-5.3.1.orig/influxdb/tests/influxdb08/dataframe_client_test.py
+++ influxdb-5.3.1/influxdb/tests/influxdb08/dataframe_client_test.py
@@ -16,7 +16,10 @@ from .client_test import _mocked_session
 
 if not using_pypy:
     import pandas as pd
-    from pandas.util.testing import assert_frame_equal
+    try:
+        from pandas.testing import assert_frame_equal
+    except ImportError:
+        from pandas.util.testing import assert_frame_equal
     from influxdb.influxdb08 import DataFrameClient
 
 
Index: influxdb-5.3.1/influxdb/tests/server_tests/client_test_with_server.py
===================================================================
--- influxdb-5.3.1.orig/influxdb/tests/server_tests/client_test_with_server.py
+++ influxdb-5.3.1/influxdb/tests/server_tests/client_test_with_server.py
@@ -34,7 +34,10 @@ warnings.simplefilter('error', FutureWar
 
 if not using_pypy:
     import pandas as pd
-    from pandas.util.testing import assert_frame_equal
+    try:
+        from pandas.testing import assert_frame_equal
+    except ImportError:
+        from pandas.util.testing import assert_frame_equal
 
 
 THIS_DIR = os.path.abspath(os.path.dirname(__file__))
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
@@ -219,7 +219,7 @@ class DataFrameClient(InfluxDBClient):
             else:
                 key = (name, tuple(sorted(tags.items())))
             df = pd.DataFrame(data)
-            df.time = pd.to_datetime(df.time)
+            df.time = pd.to_datetime(df.time, format='mixed')
 
             if data_frame_index:
                 df.set_index(data_frame_index, inplace=True)

Reply via email to