Skip to content

Commit 94aff5c

Browse files
committed
python 3.7 compatible datetime.UTC
1 parent 7aead7f commit 94aff5c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs_src/advanced/column_types/tutorial002.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from datetime import UTC, datetime
1+
from datetime import datetime
2+
try:
3+
from datetime import UTC
4+
except ImportError:
5+
UTC = None
26
from typing import TypedDict
37

48
from sqlalchemy import PickleType

docs_src/advanced/column_types/tutorial003.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from datetime import UTC, datetime
1+
from datetime import datetime
2+
try:
3+
from datetime import UTC
4+
except ImportError:
5+
UTC = None
26
from pathlib import Path
37
from uuid import UUID, uuid4
48

0 commit comments

Comments
 (0)