From f2868f97399955650c47c948dc57c376bebb67b1 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 13 Oct 2017 15:36:09 -0400 Subject: [PATCH] Updated email.Util (Python 2) references to email.utils (Python 3). --- django/utils/feedgenerator.py | 2 +- django/utils/http.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index 3b38eb5ed9..ec01d02697 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -38,7 +38,7 @@ def rfc2822_date(date): days = ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun') # Support datetime objects older than 1900 date = datetime_safe.new_datetime(date) - # We do this ourselves to be timezone aware, email.Utils is not tz aware. + # Timezone aware formatting. email.utils.formatdate() isn't tz aware. dow = days[date.weekday()] month = months[date.month - 1] time_str = date.strftime('%s, %%d %s %%Y %%H:%%M:%%S ' % (dow, month)) diff --git a/django/utils/http.py b/django/utils/http.py index 4fbb786d89..48dacf4b28 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -145,7 +145,7 @@ def parse_http_date(date): Return an integer expressed in seconds since the epoch, in UTC. """ - # emails.Util.parsedate does the job for RFC1123 dates; unfortunately + # email.utils.parsedate() does the job for RFC1123 dates; unfortunately # RFC7231 makes it mandatory to support RFC850 dates too. So we roll # our own RFC-compliant parsing. for regex in RFC1123_DATE, RFC850_DATE, ASCTIME_DATE: