Description: Fix FTBFS with pandas 2.0
Bug-Debian: https://bugs.debiab.org/1044076
Author: Andreas Tille <tille@debian.org>,
        "Rebecca N. Palmer" <rebecca_palmer@zoho.com>
Last-Update: Fri, 02 Feb 2024 18:02:11 +0100
Forwarded: no, project is archived

--- a/influxdb/tests/dataframe_client_test.py
+++ b/influxdb/tests/dataframe_client_test.py
@@ -20,7 +20,7 @@ from .client_test import _mocked_session
 
 if not using_pypy:
     import pandas as pd
-    from pandas.util.testing import assert_frame_equal
+    from pandas.testing import assert_frame_equal
     from influxdb import DataFrameClient
     import numpy as np
 
@@ -900,7 +900,7 @@ class TestDataFrameClient(unittest.TestC
             [[23422], [23422], [23422]], columns=['value'],
             index=pd.to_datetime(["2009-11-10T23:00:00Z",
                                   "2009-11-10T23:00:00Z",
-                                  "2009-11-10T23:00:00Z"]))
+                                  "2009-11-10T23:00:00Z"], format='ISO8601'))
         if pd2.index.tzinfo is None:
             pd2.index = pd2.index.tz_localize('UTC')
         expected = {
@@ -926,7 +926,7 @@ class TestDataFrameClient(unittest.TestC
                             "values": [
                                 ["2015-01-29T21:55:43.702900257Z", 0.55],
                                 ["2015-01-29T21:55:43.702900257Z", 23422],
-                                ["2015-06-11T20:46:02Z", 0.64]
+                                ["2015-06-11T20:46:02.000000000Z", 0.64]
                             ]
                         }
                     ]
@@ -949,7 +949,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.000000000+0000"]))
         if pd1.index.tzinfo is None:
             pd1.index = pd1.index.tz_localize('UTC')
         pd2 = pd.DataFrame(
@@ -983,7 +983,7 @@ class TestDataFrameClient(unittest.TestC
                                  0.55, 0.254, np.NaN],
                                 ["2015-01-29T21:55:43.702900257Z",
                                  23422, 122878, np.NaN],
-                                ["2015-06-11T20:46:02Z",
+                                ["2015-06-11T20:46:02.000000000Z",
                                  0.64, 0.5434, np.NaN]
                             ]
                         }
@@ -1010,7 +1010,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.000000000+0000"]))
 
         if pd1.index.tzinfo is None:
             pd1.index = pd1.index.tz_localize('UTC')
@@ -1021,7 +1021,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.000000000+0000"]))
 
         if pd1_dropna.index.tzinfo is None:
             pd1_dropna.index = pd1_dropna.index.tz_localize('UTC')
--- a/influxdb/tests/influxdb08/dataframe_client_test.py
+++ b/influxdb/tests/influxdb08/dataframe_client_test.py
@@ -18,7 +18,7 @@ from .client_test import _mocked_session
 
 if not using_pypy:
     import pandas as pd
-    from pandas.util.testing import assert_frame_equal
+    from pandas.testing import assert_frame_equal
     from influxdb.influxdb08 import DataFrameClient
 
 
--- a/influxdb/tests/server_tests/client_test_with_server.py
+++ b/influxdb/tests/server_tests/client_test_with_server.py
@@ -34,7 +34,7 @@ warnings.simplefilter('error', FutureWar
 
 if not using_pypy:
     import pandas as pd
-    from pandas.util.testing import assert_frame_equal
+    from pandas.testing import assert_frame_equal
 
 
 THIS_DIR = os.path.abspath(os.path.dirname(__file__))
