Skip to content

Commit 2147c5e

Browse files
jliounisPSI Bot
authored andcommitted
Fix Python 3.10 compatibility (use timezone.utc instead of datetime.UTC)
1 parent 983559f commit 2147c5e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

integrations/perplexity/tests/test_perplexity_chat_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
from datetime import UTC, datetime
5+
from datetime import datetime, timezone
66

77
import httpx
88
import pytest
@@ -27,7 +27,7 @@ def handler(request: httpx.Request) -> httpx.Response:
2727
json={
2828
"id": "chatcmpl-test",
2929
"object": "chat.completion",
30-
"created": int(datetime.now(tz=UTC).timestamp()),
30+
"created": int(datetime.now(tz=timezone.utc).timestamp()),
3131
"model": "sonar-pro",
3232
"choices": [
3333
{

0 commit comments

Comments
 (0)