Change Log¶
6.1.1 (2019/01/29)¶
Added
set()supports parameterflair_template_idfor giving a user redesign flair.
6.1.0 (2019/01/19)¶
Added
- Add method
Redditor.trophies()to get a list of the Redditor’s trophies. - Add class
PostFlairWidget. - Add attributes
reply_limitandreply_sortto classComment - Add class
SubredditWidgetsModeration(accessible throughSubredditWidgets.mod) and methodadd_text_area(). - Add class
WidgetModeration(accessible through the.modattribute on any widget) with methodsupdate()anddelete(). - Add method
Reddit.put()for HTTP PUT requests. - Add methods
add_calendar()andadd_community_list(). - Add methods
add_image_widget()andupload_image(). - Add method
add_custom_widget(). - Add method
add_post_flair_widget(). - Add method
add_menu(). - Add method
add_button_widget(). - Add method
reorder()to reorder a subreddit’s widgets. - Add
Redditors(reddit.redditors) to provide Redditor listings. - Add
submit_image()for submitting native images to Reddit. - Add
submit_video()for submitting native videos and videogifs to Reddit.
Changed
User.me()returnsNoneinread_onlymode.SubredditLinkFlairTemplates.__iter__()uses the v2 flair API endpoint. This change will result in additional fields being returned. All fields that were previously returned will still be returned.SubredditRedditorFlairTemplates.__iter__()uses the v2 flair API endpoint. The method will still return the exact same items.- Methods
add(),add(),update(), andupdate()can add and update redesign-style flairs with the v2 flair API endpoint. They can still update pre-redesign-style flairs with the older endpoint.
Fixed
- Widgets of unknown types are parsed as
Widgets rather than raising an exception
6.0.0 (2018/07/24)¶
Added
- Add method
WikiPage.revision()to get a specific wiki page revision. - Added parameter
skip_existingtostream_generator()to skip existing items when starting a stream`. - Add method
Front.best()to get the front page “best” listing. - Add
Subreddit.widgets,SubredditWidgets, and widget subclasses likeTextAreato support fetching Reddit widgets. - Add method
Submission.mark_visited()to mark a submission as visited on the Reddit backend.
Fixed
- Fix
RecursionErroronSubredditEmoji’sreprandstr. SubredditFilters.add()andSubredditFilters.remove()also accept aSubredditfor thesubredditparameter.- Remove restriction which prevents installed (non-confidential) apps from using OAuth2 authorization code grant flow.
Removed
Subreddit.submissionsas the API endpoint backing the method is no more. See https://www.reddit.com/r/changelog/comments/7tus5f/update_to_search_api/.
5.4.0 (2018/03/27)¶
Added
- Add method
patch()toRedditclass to support HTTP PATCH requests. - Add class
Preferencesto access and update Reddit preferences. - Add attribute
User.preferencesto access an instance ofPreferences. - Add method
Message.delete(). - Add class
Emojito work with custom subreddit emoji.
Deprecated
Subreddit.submissionsas the API endpoint backing the method is going away. See https://www.reddit.com/r/changelog/comments/7tus5f/update_to_search_api/.
Fixed
- Fix bug with positive
pause_aftervalues in streams provided bystream_generator()where the wait time was not reset after a yieldedNone. - Parse URLs with trailing slashes and no
'comments'element when creatingSubmissionobjects. - Fix bug where
Subreddit.submissionsreturns a same submission more than once - Fix bug where
ListingGeneratorfetches the same batch of submissions in an infinite loop when'before'parameter is provided.
Removed
- Removed support for Python 3.3 as it is no longer supported by requests.
5.3.0 (2017/12/16)¶
Added
Multireddit.stream, to stream submissions and comments from a Multireddit.Redditor.block()
Fixed
- Now raises
prawcore.UnavailableForLegalReasonsinstead of anAssertionErrorwhen encountering a HTTP 451 response.
5.2.0 (2017/10/24)¶
Changed
- An attribute on
LiveUpdatenow works as lazy attribute (i.e. populate an attribute when the attribute is first accessed).
Deprecated
subreddit.comments.gildedbecause there isn’t actually an endpoint that returns only gilded comments. Usesubreddit.gildedinstead.
Fixed
- Removed
comment.permalink()becausecomment.permalinkis now an attribute returned by Reddit.
5.1.0 (2017/08/31)¶
Added
Redditor.stream, with methodsRedditorStream.submissions()andRedditorStream.comments()to stream a Redditor’s comments or submissionsRedditorStreamhas been added to facilitateRedditor.streamInbox.collapse()to mark messages as collapsed.Inbox.uncollapse()to mark messages as uncollapsed.- Raise
ClientExceptionwhen callingrefresh()when the comment does not appear in the resulting comment tree. Submission.crosspost()to crosspost to a subreddit.
Fixed
- Calling
refresh()on a directly fetched, deeply nestedCommentwill additionally pull in as many parent comments as possible (currently 8) enabling significantly quicker traversal to the top-mostCommentvia successiveparent()calls. - Calling
refresh()previously could have resulted in aAttributeError: 'MoreComments' object has no attribute '_replies'exception. This situation will now result in aClientException. - Properly handle
BAD_CSS_NAMEerrors when uploading stylesheet images with invalid filenames. Previously anAssertionErrorwas raised. Submission’sgildedattribute properly returns the expected value from reddit.
5.0.1 (2017/07/11)¶
Fixed
5.0.0 (2017/07/04)¶
Added
Comment.disable_inbox_replies(),Comment.enable_inbox_replies()Submission.disable_inbox_replies(), andSubmission.enable_inbox_replies()to toggle inbox replies on comments and submissions.
Changed
cloudsearchis no longer the default syntax forSubreddit.search().luceneis now the default syntax so that PRAW’s default is aligned with Reddit’s default.Reddit.info()will now take either a list of fullnames or a single URL string.Subreddit.submit()accepts a flair template ID and text.
Fixed
- Fix accessing
LiveUpdate.contribraisesAttributeError.
Removed
- Iterating directly over
SubredditRelationship(e.g.,subreddit.banned,subreddit.contributor,subreddit.moderator, etc) andSubredditFlairis no longer possible. Iterate instead over their callables, e.g.subreddit.banned()andsubreddit.flair(). - The following methods are removed:
Subreddit.mod.approve,Subreddit.mod.distinguish,Subreddit.mod.ignore_reports,Subreddit.mod.remove,Subreddit.mod.undistinguish,Subreddit.mod.unignore_reports. - Support for passing a
SubmissiontoSubredditFlair.set()is removed. - The
thingargument toSubredditFlair.set()is removed. - Return values from
Comment.block(),Message.block(),SubredditMessage.block(),SubredditFlair.delete(),friend(),Redditor.message(),Subreddit.message(),select(), andunfriend()are removed as they do not provide any useful information. praw.inino longer reads inhttp_proxyandhttps_proxysettings.is_linkparameter ofSubredditRedditorFlairTemplates.add()andSubredditRedditorFlairTemplates.clear(). UseSubredditLinkFlairTemplatesinstead.
4.6.0 (2017/07/04)¶
The release’s sole purpose is to announce the deprecation of the is_link
parameter as described below:
Added
SubredditFlair.link_templatesto manage link flair templates.
Deprecated
is_linkparameter ofSubredditRedditorFlairTemplates.add()andSubredditRedditorFlairTemplates.clear(). UseSubredditLinkFlairTemplatesinstead.
4.5.1 (2017/05/07)¶
Fixed
- Calling
parent()works onCommentinstances obtained viacomment_replies().
4.5.0 (2017/04/29)¶
Added
unread_count()to get unread count by conversation state.bulk_read()to mark conversations as read by conversation state.subreddits()to fetch subreddits using new modmail.create()to create a new modmail conversation.read()to mark modmail conversations as read.unread()to mark modmail conversations as unread.conversations()to get new modmail conversations.highlight()to highlight modmail conversations.unhighlight()to unhighlight modmail conversations.mute()to mute modmail conversations.unmute()to unmute modmail conversations.archive()to archive modmail conversations.unarchive()to unarchive modmail conversations.reply()to reply to modmail conversations.__call__()to get a new modmail conversation.Inbox.stream()to stream new items in the inbox.- Exponential request delay to all streams when no new items are returned in a request. The maximum delay between requests is 66 seconds.
Changed
submit()acceptsselftext=''to create a title-only submission.Redditacceptsrequestor_class=clsfor a customized requestor class andrequestor_kwargs={'param': value}for passing arguments to requestor initialization.comments(),submissions(), andstream()accept apause_afterargument to allow pausing of the stream. The default value ofNoneretains the preexisting behavior.
Deprecated
cloudsearchwill no longer be the default syntax forSubreddit.search()in PRAW 5. Insteadlucenewill be the default syntax so that PRAW’s default is aligned with Reddit’s default.
Fixed
- Fix bug where
WikiPagerevisions with deleted authors causedTypeError. Submissionattributescomment_limitandcomment_sortmaintain their values after making instances non-lazy.
4.4.0 (2017/02/21)¶
Added
LiveThreadContribution.update()to update settings of a live thread.reset_timestamptolimitsto provide insight into when the current rate limit window will expire.upload_mobile_header()to upload subreddit mobile header.upload_mobile_icon()to upload subreddit mobile icon.delete_mobile_header()to remove subreddit mobile header.delete_mobile_icon()to remove subreddit mobile icon.LiveUpdateContribution.strike()to strike a content of a live thread.LiveContributorRelationship.update()to update contributor permissions for a redditor.LiveContributorRelationship.update_invite()to update contributor invite permissions for a redditor.LiveThread.discussions()to get submissions linking to the thread.LiveThread.report()to report the thread violating the Reddit rules.LiveHelper.now()to get the currently featured live thread.LiveHelper.info()to fetch information about each live thread in live thread IDs.
Fixed
- Uploading an image resulting in too large of a request (>500 KB) now
raises
prawcore.TooLargeinstead of anAssertionError. - Uploading an invalid image raises
APIException. Redditorinstances obtained viamoderator(e.g.,reddit.subreddit('subreddit').moderator()) will contain attributes with the relationship metadata (e.g.,mod_permissions).Messageinstances retrieved from the inbox now have attributesauthor,destrepliesandsubredditproperly converted to their appropriate PRAW model.
4.3.0 (2017/01/19)¶
Added
LiveContributorRelationship.leave()to abdicate the live thread contributor position.LiveContributorRelationship.remove()to remove the redditor from the live thread contributors.limitsto provide insight into number of requests made and remaining in the current rate limit window.LiveThread.contribto obtain an instance ofLiveThreadContribution.LiveThreadContribution.add()to add an update to the live thread.LiveThreadContribution.close()to close the live thread permanently.LiveUpdate.contribto obtain an instance ofLiveUpdateContribution.LiveUpdateContribution.remove()to remove a live update.LiveContributorRelationship.accept_invite()to accept an invite to contribute the live thread.SubredditHelper.create()andSubredditModeration.update()have documented support forspoilers_enabled. Note, however, thatSubredditModeration.update()will currently unset thespoilers_enabledvalue until such a time that Reddit returns the value along with the other settings.spoiler()andunspoiler()to change a submission’s spoiler status.
Fixed
LiveContributorRelationship.invite()andLiveContributorRelationship.remove_invite()now hit endpoints, which starts with ‘api/’, for consistency.ModeratorRelationship.update(), andModeratorRelationship.update_invite()now always remove known unlisted permissions.
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
hide()andunhide()now accept a list of additional submissions.replace_more()is now recoverable. Previously, when an exception was raised during the work done byreplace_more(), all unreplacedMoreCommentsinstances were lost. NowMoreCommentsinstances are only removed once their children have been added to theCommentForestenabling callers ofreplace_more()to call the method as many times as required to complete the replacement.- Working with contributors on
SubredditWikiis done consistently throughcontributornotcontributors. Subreddit.moderator()works.live_thread.contributor()now returnsRedditorListcorrectly.
Removed
validate_time_filteris 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__.SubredditFiltersto work with filters for special subreddits, like/r/all.- Added callables for
SubredditRelationshipandSubredditFlairso thatlimitand other parameters can be passed. - Add
reply()toMessagewhich was accidentally missed previously. - Add
stickyparameter 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()toSubredditto permit working with quarantined subreddits.LiveUpdateto represent an individual update in aLiveThread.- Ability to access an individual
LiveUpdateviareddit.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=Falsewhen calling to bypass the cache.replace_more()can be called onCommentreplies.
Deprecated
validate_time_filterwill 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) andSubredditFlairwill 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
SubmissiontoSubredditFlair.set()will be removed in PRAW 5. Useflair()instead. - The
thingargument toSubredditFlair.set()is replaced withredditorand will be removed in PRAW 5.
Fixed
SubredditModeration.update()accurately updatesexclude_banned_modqueue,header_hover_text,show_mediaandshow_media_previewvalues.- Instances of
Commentobtained through the inbox (including mentions) are now refreshable. - Searching
/r/allshould now work as intended for all users. - Accessing an invalid attribute on an instance of
Messagewill raiseAttributeErrorinstead 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
implicitparameter 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().WikiPagesupports 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_streamis nowpraw.models.reddit.subreddit.SubredditStream.comments()helpers.submissions_betweenis nowSubreddit.submissions. This new method now only iterates through newest submissions first and as a result makes approximately 33% fewer requests.helpers.submission_streamis nowpraw.models.reddit.subreddit.SubredditStream.submissions()
Removed
- Removed
Reddit’sloginmethod. Authentication must be done through OAuth. - Removed
praw-multiprocessas this functionality is no longer needed with PRAW 4. - Removed non-oauth functions
Message.collapseandMessage.uncollapseis_username_available. - Removed captcha related functions.
For changes prior to version 4.0 please see: 3.4.0 changelog