From d346b4056a69940f388126882e16e0487be7226d Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Tue, 24 Oct 2017 00:43:17 -0400 Subject: [PATCH] Updating PRAW library to patch a breaking API change --- rtv/packages/__init__.py | 2 +- rtv/packages/praw/objects.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rtv/packages/__init__.py b/rtv/packages/__init__.py index 7594fb4..4932326 100644 --- a/rtv/packages/__init__.py +++ b/rtv/packages/__init__.py @@ -10,7 +10,7 @@ from __future__ import absolute_import import sys -__praw_hash__ = 'ad0dbcf49d5937ffd39e13e45ebcb404b00c582a' +__praw_hash__ = 'f3bb10e497e8266faf82892c082b8d32aed6239a' __praw_bundled__ = True diff --git a/rtv/packages/praw/objects.py b/rtv/packages/praw/objects.py index a4f94f5..f308938 100644 --- a/rtv/packages/praw/objects.py +++ b/rtv/packages/praw/objects.py @@ -115,6 +115,13 @@ class RedditContentObject(object): """Set the `name` attribute to `value.""" if value and name == 'subreddit' and isinstance(value, six.string_types): value = Subreddit(self.reddit_session, value, fetch=False) + elif name == 'permalink' and isinstance(self, Comment): + # The Reddit API now returns the permalink field for comments. This + # will unfortunately break PRAW because permalink is a @property on the + # Comment object. I need to investigate if the property can be removed, + # for now this is a quick hack to get things working again. + # https://github.com/michael-lazar/rtv/issues/462 + return elif value and name in REDDITOR_KEYS: if isinstance(value, bool): pass