summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-08-27 14:16:21 (GMT)
committerGitHub <noreply@github.com>2023-08-27 14:16:21 (GMT)
commit07c0e24748edc1e502c949a9f7276b6dbbff9b0d (patch)
tree2d4b01d04564c01014e00abacb53ff5700aa6f0a
parent0b0238d6a1e1b41be98193fd6e5857b220424adb (diff)
downloadcpython-07c0e24748edc1e502c949a9f7276b6dbbff9b0d.zip
cpython-07c0e24748edc1e502c949a9f7276b6dbbff9b0d.tar.gz
cpython-07c0e24748edc1e502c949a9f7276b6dbbff9b0d.tar.bz2
[3.12] Clarify distinction between datetime module and class in deprecation messages (GH-108073) (#108540)
Clarify distinction between datetime module and class in deprecation messages (GH-108073) (cherry picked from commit 09343dba44cdb5c279ec51df34552ef451434958) Co-authored-by: Clément Robert <cr52@protonmail.com>
-rw-r--r--Modules/_datetimemodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index cbc331c..d8183c6 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -5145,9 +5145,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;
}
@@ -5188,9 +5188,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;
}