diff options
| author | Tim Graham <timograham@gmail.com> | 2017-10-13 15:36:09 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-10-13 15:36:44 -0400 |
| commit | 53a3d2b2454ff9a612a376f58bb7c61733f82d12 (patch) | |
| tree | d014cf0ef71ee9dd1c2be3bd82c66240866ba83d | |
| parent | 5595eccd4f21098f13640711420463d528b22560 (diff) | |
[2.0.x] Updated email.Util (Python 2) references to email.utils (Python 3).
Backport of f2868f97399955650c47c948dc57c376bebb67b1 from master
| -rw-r--r-- | django/utils/feedgenerator.py | 2 | ||||
| -rw-r--r-- | 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 aadd05ca43..5e900506ff 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -147,7 +147,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: |
