Change Log¶
4.2.0 (2017/01/07)¶
Added
Subreddit.rules()
to get the rules of a subreddit.LiveContributorRelationship
, which can be obtained throughLiveThread.contributor
, to interact with live threads’ contributors.remove_invite()
to remove a moderator invite.LiveContributorRelationship.invite()
to send a contributor invitation.LiveContributorRelationship.remove_invite()
to remove the contributor invitation.
Deprecated
- Return values from
Comment.block()
,Message.block()
,SubredditMessage.block()
,SubredditFlair.delete()
,friend()
,Redditor.message()
,Subreddit.message()
,select()
, andunfriend()
will be removed in PRAW 5 as they do not provide any useful information.
Fixed
replace_more()
is now recoverable. Previously, when an exception was raised during the work done byreplace_more()
, all unreplacedMoreComments
instances were lost. NowMoreComments
instances are only removed once their children have been added to theCommentForest
enabling callers ofreplace_more()
to call the method as many times as required to complete the replacement.- Working with contributors on
SubredditWiki
is done consistently throughcontributor
notcontributors
. Subreddit.moderator()
works.live_thread.contributor()
now returnsRedditorList
correctly.
Removed
validate_time_filter
is no longer part of the public interface.
4.1.0 (2016/12/24)¶
Added
praw.models.Subreddits.search_by_topic()
to search subreddits by topic. (see: https://www.reddit.com/dev/api/#GET_api_subreddits_by_topic).praw.models.LiveHelper.__call__()
to provide interface topraw.models.LiveThread.__init__
.SubredditFilters
to work with filters for special subreddits, like/r/all
.- Added callables for
SubredditRelationship
andSubredditFlair
so thatlimit
and other parameters can be passed. - Add
reply()
toMessage
which was accidentally missed previously. - Add
sticky
parameter toCommentModeration.distinguish()
to sticky comments. flair()
to add a submission’s flair from an instance ofSubmission
.Comment.parent()
to obtain the parent of aComment
.opt_in()
andopt_out()
toSubreddit
to permit working with quarantined subreddits.LiveUpdate
to represent an individual update in aLiveThread
.- Ability to access an individual
LiveUpdate
viareddit.live('THREAD_ID')['UPDATE_ID']
. LiveThread.updates()
to iterate the updates of the thread.
Changed
me()
now caches its result in order to reduce redundant requests for methods that depend on it. Setuse_cache=False
when calling to bypass the cache.replace_more()
can be called onComment
replies
.
Deprecated
validate_time_filter
will be removed from the public interface in PRAW 4.2 as it was never intended to be part of it to begin with.- Iterating directly over
SubredditRelationship
(e.g.,subreddit.banned
,subreddit.contributor
,subreddit.moderator
, etc) andSubredditFlair
will be removed in PRAW 5. Iterate instead over their callables, e.g.subreddit.banned()
andsubreddit.flair()
. - The following methods are deprecated to be removed in PRAW 5 and are replaced
with similar
Comment.mod...
andSubmission.mod...
alternatives:Subreddit.mod.approve
,Subreddit.mod.distinguish
,Subreddit.mod.ignore_reports
,Subreddit.mod.remove
,Subreddit.mod.undistinguish
,Subreddit.mod.unignore_reports
. - Support for passing a
Submission
toSubredditFlair.set()
will be removed in PRAW 5. Useflair()
instead. - The
thing
argument toSubredditFlair.set()
is replaced withredditor
and will be removed in PRAW 5.
Fixed
SubredditModeration.update()
accurately updatesexclude_banned_modqueue
,header_hover_text
,show_media
andshow_media_preview
values.- Instances of
Comment
obtained through the inbox (including mentions) are now refreshable. - Searching
/r/all
should now work as intended for all users. - Accessing an invalid attribute on an instance of
Message
will raiseAttributeError
instead ofPRAWException
.
4.0.0 (2016/11/29)¶
Fixed
- Fix bug where ipython tries to access attribute
_ipython_canary_method_should_not_exist_
resulting in a useless fetch. - Fix bug where Comment replies becomes [] after attempting to access an invalid attribute on the Comment.
- Reddit.wiki[...] converts the passed in page name to lower case as pages are only saved in lower case and non-lower case page names results in a Redirect exception (thanks pcjonathan).
4.0.0rc3 (2016/11/26)¶
Added
implicit
parameter tourl()
to support the implicit flow for installed applications (see: https://github.com/reddit/reddit/wiki/OAuth2#authorization-implicit-grant-flow)scopes()
to discover which scopes are available to the current authentication- Lots of documentation: http://praw.readthedocs.io/
4.0.0rc2 (2016/11/20)¶
Fixed
authorize()
properly sets the session’s Authentication (thanks @williammck).
4.0.0rc1 (2016/11/20)¶
PRAW 4 introduces significant breaking changes. The numerous changes are not listed here, only the feature removals. Please read through Quick Start to help with updating your code to PRAW 4. If you require additional help please ask on /r/redditdev or in the praw-dev/praw channel on gitter.
Added
praw.models.Comment.block()
,praw.models.Message.block()
, andpraw.models.SubredditMessage.block()
to permit blocking unwanted user contact.praw.models.LiveHelper.create()
to create new live threads.praw.models.Redditor.unblock()
to undo a block.praw.models.Subreddits.gold()
to iterate through gold subreddits.praw.models.Subreddits.search()
to search for subreddits by name and description.praw.models.Subreddits.stream()
to obtain newly created subreddits in near-realtime.praw.models.User.karma()
to retrieve the current user’s subreddit karma.praw.models.reddit.submission.SubmissionModeration.lock()
andpraw.models.reddit.submission.SubmissionModeration.unlock()
to change a Submission’s lock state.praw.models.reddit.subreddit.SubredditFlairTemplates.delete()
to delete a single flair template.praw.models.reddit.subreddit.SubredditModeration.unread()
to iterate over unread moderation messages.praw.models.reddit.subreddit.ModeratorRelationship.invite()
to invite a moderator to a subreddit.praw.models.reddit.subreddit.ModeratorRelationship.update()
to update a moderator’s permissions.praw.models.reddit.subreddit.ModeratorRelationship.update_invite()
to update an invited moderator’s permissions.praw.models.Front.random_rising()
,praw.models.Subreddit.random_rising()
andpraw.models.Multireddit.random_rising()
.WikiPage
supports a revision argument.revisions()
to obtain a list of recent revisions to a subreddit.revisions()
to obtain a list of revisions for a wiki page.- Support installed-type OAuth apps.
- Support read-only OAuth for all application types.
- Support script-type OAuth apps.
Changed
Note
Only prominent changes are listed here.
helpers.comments_stream
is nowpraw.models.reddit.subreddit.SubredditStream.comments()
helpers.submissions_between
is nowpraw.models.Subreddit.submissions()
. This new method now only iterates through newest submissions first and as a result makes approximately 33% fewer requests.helpers.submission_stream
is nowpraw.models.reddit.subreddit.SubredditStream.submissions()
Removed
- Removed
Reddit
‘slogin
method. Authentication must be done through OAuth. - Removed praw-multiprocess as this functionality is no longer needed with PRAW 4.
- Removed non-oauth functions
Message.collapse
andMessage.uncollapse
is_username_available
. - Removed captcha related functions.
For changes prior to version 4.0 please see: 3.4.0 changelog