From 3cec78924e9daa99cb1c46bbacc4dbd2c283d05c Mon Sep 17 00:00:00 2001 From: Ace Pace Date: Sat, 21 Dec 2024 21:27:24 +0200 Subject: [PATCH] chore: update usage of datetime.now datetime.datetime.utcnow() is deprecated, replace with tz aware function Note this adds a user warning from numpy but this seems preferable Signed-off-by: Ace Pace --- .../plotly/plotly/tests/test_io/test_to_from_plotly_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/tests/test_io/test_to_from_plotly_json.py b/packages/python/plotly/plotly/tests/test_io/test_to_from_plotly_json.py index 38bbcdaeceb..db325f144ae 100644 --- a/packages/python/plotly/plotly/tests/test_io/test_to_from_plotly_json.py +++ b/packages/python/plotly/plotly/tests/test_io/test_to_from_plotly_json.py @@ -109,7 +109,7 @@ def numpy_unicode_array(request): params=[ datetime.datetime(2003, 7, 12, 8, 34, 22), datetime.datetime.now(), - np.datetime64(datetime.datetime.utcnow()), + np.datetime64(datetime.datetime.now(datetime.timezone.utc)), pd.Timestamp(datetime.datetime.now()), eastern.localize(datetime.datetime(2003, 7, 12, 8, 34, 22)), eastern.localize(datetime.datetime.now()),