← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:feedparser-deprecation into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:feedparser-deprecation into launchpad:master.

Commit message:
Fix deprecation warning from feedparser

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/377205

Since version 5.1.1, feedparser maps `pubDate` to `published_parsed`, and warns about accessing it via `updated_parsed`.  Use the new preferred attribute name.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:feedparser-deprecation into launchpad:master.
diff --git a/lib/lp/app/browser/root.py b/lib/lp/app/browser/root.py
index 989c46a..ccfb0fd 100644
--- a/lib/lp/app/browser/root.py
+++ b/lib/lp/app/browser/root.py
@@ -184,7 +184,7 @@ class LaunchpadRootIndexView(HasAnnouncementsView, LaunchpadView):
                 'title': entry.title,
                 'description': entry.description,
                 'link': entry.link,
-                'date': time.strftime('%d %b %Y', entry.updated_parsed),
+                'date': time.strftime('%d %b %Y', entry.published_parsed),
                 })
         # The cache of posts expires after an hour.
         getUtility(IMemcacheClient).set(key, posts, time=3600)