Skip to content

Commit 6f22f49

Browse files
committed
clarify distinction between datetime module and class in deprecation messages (again)
1 parent 6b15ff5 commit 6f22f49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/_pydatetime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ def fromtimestamp(cls, timestamp, tz=None):
18131813
def utcfromtimestamp(cls, t):
18141814
"""Construct a naive UTC datetime from a POSIX timestamp."""
18151815
import warnings
1816-
warnings.warn("datetime.utcfromtimestamp() is deprecated and scheduled "
1816+
warnings.warn("datetime.datetime.utcfromtimestamp() is deprecated and scheduled "
18171817
"for removal in a future version. Use timezone-aware "
18181818
"objects to represent datetimes in UTC: "
18191819
"datetime.datetime.fromtimestamp(t, datetime.UTC).",
@@ -1831,7 +1831,7 @@ def now(cls, tz=None):
18311831
def utcnow(cls):
18321832
"Construct a UTC datetime from time.time()."
18331833
import warnings
1834-
warnings.warn("datetime.utcnow() is deprecated and scheduled for "
1834+
warnings.warn("datetime.datetime.utcnow() is deprecated and scheduled for "
18351835
"removal in a future version. Instead, Use timezone-aware "
18361836
"objects to represent datetimes in UTC: "
18371837
"datetime.datetime.now(datetime.UTC).",

0 commit comments

Comments
 (0)