diff options
author | Clément Robert <cr52@protonmail.com> | 2023-08-27 13:09:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-27 13:09:40 (GMT) |
commit | 09343dba44cdb5c279ec51df34552ef451434958 (patch) | |
tree | 8fbbb847a28609c19b5657bb5979941f73fa7cfb /Modules | |
parent | cd0a8aece974330ef44ffe4e0f2e8aa632e98438 (diff) | |
download | cpython-09343dba44cdb5c279ec51df34552ef451434958.zip cpython-09343dba44cdb5c279ec51df34552ef451434958.tar.gz cpython-09343dba44cdb5c279ec51df34552ef451434958.tar.bz2 |
Clarify distinction between datetime module and class in deprecation messages (GH-108073)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_datetimemodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 454be6e..191db3f 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -5136,9 +5136,9 @@ static PyObject * datetime_utcnow(PyObject *cls, PyObject *dummy) { if (PyErr_WarnEx(PyExc_DeprecationWarning, - "datetime.utcnow() is deprecated and scheduled for removal in a " + "datetime.datetime.utcnow() is deprecated and scheduled for removal in a " "future version. Use timezone-aware objects to represent datetimes " - "in UTC: datetime.now(datetime.UTC).", 1)) + "in UTC: datetime.datetime.now(datetime.UTC).", 1)) { return NULL; } @@ -5179,9 +5179,9 @@ static PyObject * datetime_utcfromtimestamp(PyObject *cls, PyObject *args) { if (PyErr_WarnEx(PyExc_DeprecationWarning, - "datetime.utcfromtimestamp() is deprecated and scheduled for removal " + "datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal " "in a future version. Use timezone-aware objects to represent " - "datetimes in UTC: datetime.fromtimestamp(timestamp, datetime.UTC).", 1)) + "datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).", 1)) { return NULL; } |