Change Log#

PRAW follows semantic versioning.

7.7.1 (2023/07/11)#

Fixed

  • An issue with replying to a modmail conversation results in a error.

7.7.0 (2023/02/25)#

Added

  • delete_mobile_banner() to delete mobile banners.

  • upload_mobile_banner() to upload mobile banners.

  • Experimental _edit_experimental() for adding new inline media or editing a submission that has inline media.

    Danger

    This method is experimental. It is reliant on undocumented API endpoints and may result in existing inline media not displaying correctly and/or creating a malformed body. Use at your own risk. This method may be removed in the future without warning.

    This method is identical to Submission.edit() except for the following:

    • The ability to add inline media to existing posts.

    • Additional preserve_inline_media keyword argument to allow PRAW to attempt to preserve the existing inline media when editing a post. This is an experimental fix for an issue that occurs when editing a post with inline media would cause the media to lose their inline appearance.

Fixed

  • An issue with iterating ModNote when a user has more than a hundred notes.

  • Removal reasons are now returned in the same order as they appear on Reddit.

7.6.1 (2022/11/11)#

Changed

  • Revert edit() positional argument deprecation.

  • Revert reply() positional argument deprecation.

  • Revert reply() positional argument deprecation.

  • Revert edit() positional argument deprecation.

  • Revert reply() positional argument deprecation.

Fixed

  • An issue where ModmailConversation’s messages attribute would only contain the latest message.

7.6.0 (2022/05/10)#

Added

Changed

  • Drop support for Python 3.6, which is end-of-life on 2021-12-23.

  • conversations() now returns a ListingGenerator allowing you to page through more than 100 conversations.

Deprecated

  • The after argument for conversations() will now have to be included in params keyword argument.

  • Positional keyword arguments for applicable functions and methods. Starting with PRAW 8, most functions and methods will no longer support positional arguments. It will encourage more explicit argument passing, enable arguments to be sorted alphabetically, and prevent breaking changes when adding new arguments to existing methods.

7.5.0 (2021/11/13)#

Added

  • Log a warning if a submission’s comment_sort attribute is updated after the submission has already been fetched and a warn_comment_sort config setting to turn off the warning.

  • user_selectable() to get available subreddit link flairs.

  • Automatic RateLimit handling will support errors with millisecond resolution.

Fixed

  • An import error when using PRAW in environments where libsqlite3-dev is needed to utilize the sqlite3 builtin.

  • Fixed bug where some keyword arguments that are passed to Draft.submit() would not have an effect.

7.4.0 (2021/07/30)#

Added

Changed

Deprecated

  • Reddit keyword argument token_manager.

7.3.0 (2021/06/17)#

Added

Changed

  • moderated() will now objectify all data returned from the API.

  • The wiki_edit endpoint has been changed from r/{subreddit}/api/wiki/edit/ to r/{subreddit}/api/wiki/edit.

  • Redditor.block() no longer needs to retrieve a user’s fullname.

Deprecated

Fixed

  • Fixed bug where WikiPage.edit() and SubredditWiki.create() would fail if passed content and reason parameters that produced a request with a body greater than 500 KiB, even when the parameters did not exceed their respective permitted maximum lengths.

  • Fixed bug where request() could not handle instances of BadRequests when the JSON data contained only the keys “reason” and “message”.

  • Fixed bug where request() could not handle instances of BadRequests when the response did not contain valid JSON data.

  • Fixed bug where fullname() sometimes returned the wrong fullname.

7.2.0 (2021/02/24)#

Added

Deprecated

  • The configuration setting refresh_token is deprecated and its use will result in a DeprecationWarning. This deprecation applies in all ways of setting configuration values, i.e., via praw.ini, as a keyword argument when initializing an instance of Reddit, and via the PRAW_REFRESH_TOKEN environment variable. To be prepared for PRAW 8, use the new Reddit keyword argument token_manager. See Working with Refresh Tokens in PRAW’s documentation for an example.

  • me() will no longer return None when called in read_only mode starting in PRAW 8. A DeprecationWarning will be issued. To switch forward to the PRAW 8 behavior set praw8_raise_exception_on_me=True in your Reddit call.

7.1.4 (2021/02/07)#

Fixed

  • Asynchronous check will no longer fail in Python 3.6 multithreading edge cases.

7.1.3 (2021/02/05)#

Changed

  • Asynchronous check will no longer occur when in a Jupyter notebook.

7.1.2 (2021/02/03)#

Fixed

  • Asynchronous check would not work on Python 3.6 as get_running_loop() only exists on Python 3.7+.

7.1.1 (2021/02/02)#

Added

  • Add method Subreddits.premium() to reflect the naming change in Reddit’s API.

  • Ability to submit image galleries with submit_gallery().

  • Ability to pass a gallery url to Reddit.submission().

  • Ability to specify modmail mute duration.

  • Add method invited() to get invited moderators of a subreddit.

  • Ability to submit text/self posts with inline media.

  • Add method Submission.award() and Comment.award() with the ability to specify type of award, anonymity, and message when awarding a submission or comment.

  • Ability to specify subreddits by name using the subreddits parameter in Reddit.info().

  • A check to see if PRAW is running in an asynchronous environment and will advise the user to use Async PRAW. This also adds a configuration option to disable the check.

Changed

  • Drop support for Python 3.5, which is end-of-life on 2020-09-13.

  • BoundedSet will now utilize a Last-Recently-Used (LRU) storing mechanism, which will change the order in which elements are removed from the set.

  • Improved submit_image() and submit_video() performance in slow network environments by removing a race condition when establishing a websocket connection.

Deprecated

Fixed

  • An issue where leaving as a moderator fails if you are using token auth.

  • An issue where an incorrect error was being raised due to invalid submission urls.

  • Some cases where streams yield the same item multiple times. This cannot be prevented in every case.

7.1.0 (2020/06/22)#

Added

Changed

Deprecated

Fixed

  • An issue where certain subreddit settings could not be set through SubredditModeration.update(), such as welcome_message_enabled and welcome_message_text. This change also removes the need for PRAW to track current subreddit settings and send unmodified ones in the update request.

  • Instances of BadRequests captured by PRAW that do not contain any detailed JSON data are re-raised as the original BadRequest.

  • submit_image() and submit_video() will throw MediaPostFailed when Reddit fails to post an image or video post.

7.0.0 (2020/04/24)#

Added

Warning

In May-June 2020, Reddit will force all submissions to run through a subreddit’s validation rules.

  • Introduced a data class, RedditErrorItem, to represent an individual error item returned from Reddit.

  • Class RedditAPIException now serves as a container for the RedditErrorItems. You can access the items by doing RedditAPIException.items, which returns a list.

  • APIException is an alias to RedditAPIException.

  • Parameter discussion_type to methods submit(), submit_image(), and submit_video() to support submitting as a live discussion (set to "CHAT").

  • Instances of Trophy can be compared for equality with each other.

  • Reddit has a new configurable parameter, timeout. This defaults to 16 seconds. It controls how long PRAW will wait for a response before throwing an exception.

  • PRAW now handles ratelimit errors returned as instances of RedditAPIException.

  • Reddit has one new parameter, ratelimit_seconds . The parameter configures the maximum amount of seconds to catch ratelimits for. It defaults to 5 seconds when not specified.

Changed

  • prawcore.BadRequest should no longer be raised. Instead, a more useful RedditAPIException instance will be raised.

  • Set the default comment sort to confidence instead of best because it turns out best isn’t actually the correct value for the parameter.

Deprecated

  • APIException is deprecated and slated for removal in PRAW 8.0.

Fixed

Removed

6.5.1 (2020/01/07)#

Fixed

  • Removed usages of NoReturn that caused PRAW to fail due to ImportError in Python <3.5.4 and <3.6.2.

6.5.0 (2020/01/05)#

Added

Deprecated

  • Method reddit.user.moderator_subreddits as moderated() provides more functionality.

  • The file for ModActions (praw/models/modaction.py) has been moved to praw/models/mod_action.py and the previous has been deprecated.

Expected Changes

  • The behavior of APIException will no longer unicode-escape strings in the next minor release.

6.4.0 (2019/09/21)#

Added

  • crosspost() support parameter flair_id to flair the submission immediately upon crossposting.

  • crosspost() support parameter flair_text to set a custom text to the flair immediately upon crossposting.

  • crosspost() support parameter nsfw to mark the submission NSFW immediately upon crossposting.

  • crosspost() support parameter spoiler to mark the submission as a spoiler immediately upon crossposting.

Fixed

Changed

  • Removed css_class parameter cannot be used with background_color, text_color, or mod_only constraint on methods:

    • SubredditFlairTemplates.update()

    • SubredditRedditorFlairTemplates.add()

    • SubredditLinkFlairTemplates.add()

Removed

  • Drop official support for Python 2.7.

  • Multireddit.rename() no longer works due to a change in the Reddit API.

6.3.1 (2019/06/10)#

Removed

  • SubredditListingMixin.gilded(), as this was supposed to be removed in 6.0.0 after deprecation in 5.2.0.

6.3.0 (2019/06/09)#

Added

Changed

  • Reddit.info() now accepts any non-str iterable for fullnames (not just list).

  • Reddit.info() now returns a generator instead of a list when using the url parameter.

6.2.0 (2019/05/05)#

Added

Fixed

Other

  • Bumped minimum prawcore version to 1.0.1.

6.1.1 (2019/01/29)#

Added

6.1.0 (2019/01/19)#

Added

Changed

Fixed

  • Widgets of unknown types are parsed as Widgets rather than raising an exception.

6.0.0 (2018/07/24)#

Added

Fixed

Removed

5.4.0 (2018/03/27)#

Added

Deprecated

Fixed

  • Fix bug with positive pause_after values in streams provided by stream_generator() where the wait time was not reset after a yielded None.

  • Parse URLs with trailing slashes and no "comments" element when creating Submission objects.

  • Fix bug where Subreddit.submissions returns a same submission more than once

  • Fix bug where ListingGenerator fetches 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

Fixed

  • Now raises prawcore.UnavailableForLegalReasons instead of an AssertionError when encountering a HTTP 451 response.

5.2.0 (2017/10/24)#

Changed

  • An attribute on LiveUpdate now works as lazy attribute (i.e., populate an attribute when the attribute is first accessed).

Deprecated

  • subreddit.comments.gilded because there isn’t actually an endpoint that returns only gilded comments. Use subreddit.gilded instead.

Fixed

  • Removed comment.permalink() because comment.permalink is now an attribute returned by Reddit.

5.1.0 (2017/08/31)#

Added

Fixed

  • Calling Comment.refresh() on a directly fetched, deeply nested Comment will additionally pull in as many parent comments as possible (currently 8) enabling significantly quicker traversal to the top-most Comment via successive parent() calls.

  • Calling refresh() previously could have resulted in a AttributeError: "MoreComments" object has no attribute "_replies" exception. This situation will now result in a ClientException.

  • Properly handle BAD_CSS_NAME errors when uploading stylesheet images with invalid filenames. Previously an AssertionError was raised.

  • Submission’s gilded attribute properly returns the expected value from reddit.

5.0.1 (2017/07/11)#

Fixed

  • Calls to hide() and unhide() properly batch into requests of 50 submissions at a time.

  • Lowered the average maximum delay between inactive stream checks by 4x to 16 seconds. It was previously 64 seconds, which was too long.

5.0.0 (2017/07/04)#

Added

Changed

  • cloudsearch is no longer the default syntax for search(). lucene is 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

Removed

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

Deprecated

4.5.1 (2017/05/07)#

Fixed

4.5.0 (2017/04/29)#

Added

Changed

Deprecated

  • cloudsearch will no longer be the default syntax for Subreddit.search() in PRAW 5. Instead, lucene will be the default syntax so that PRAW’s default is aligned with Reddit’s default.

Fixed

  • Fix bug where WikiPage revisions with deleted authors caused TypeError.

  • Submission attributes comment_limit and comment_sort maintain their values after making instances non-lazy.

4.4.0 (2017/02/21)#

Added

Fixed

  • Uploading an image resulting in too large of a request (>500 KB) now raises prawcore.TooLarge instead of an AssertionError.

  • Uploading an invalid image raises APIException.

  • Redditor instances obtained via moderator (e.g., reddit.subreddit("test").moderator()) will contain attributes with the relationship metadata (e.g., mod_permissions).

  • Message instances retrieved from the inbox now have attributes author, dest replies and subreddit properly converted to their appropriate PRAW model.

4.3.0 (2017/01/19)#

Added

Fixed

4.2.0 (2017/01/07)#

Added

Deprecated

Fixed

  • hide() and unhide() now accept a list of additional submissions.

  • replace_more() is now recoverable. Previously, when an exception was raised during the work done by replace_more(), all unreplaced MoreComments instances were lost. Now MoreComments instances are only removed once their children have been added to the CommentForest enabling callers of replace_more() to call the method as many times as required to complete the replacement.

  • Working with contributors on SubredditWiki is done consistently through contributor not contributors.

  • Subreddit.moderator() works.

  • live_thread.contributor() now returns RedditorList correctly.

Removed

  • validate_time_filter is no longer part of the public interface.

4.1.0 (2016/12/24)#

Added

Changed

  • me() now caches its result in order to reduce redundant requests for methods that depend on it. Set use_cache=False when calling to bypass the cache.

  • replace_more() can be called on Comment 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) and SubredditFlair will be removed in PRAW 5. Iterate instead over their callables, e.g. subreddit.banned() and subreddit.flair().

  • The following methods are deprecated to be removed in PRAW 5 and are replaced with similar Comment.mod... and Submission.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 to SubredditFlair.set() will be removed in PRAW 5. Use Submission.flair() instead.

  • The thing argument to SubredditFlair.set() is replaced with redditor and will be removed in PRAW 5.

Fixed

  • SubredditModeration.update() accurately updates exclude_banned_modqueue, header_hover_text, show_media and show_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 raise AttributeError instead of PRAWException.

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

4.0.0rc2 (2016/11/20)#

Fixed

  • Auth.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 via Slack.

Added

Changed

Note

Only prominent changes are listed here.

  • helpers.comments_stream is now SubredditStream.comments()

  • helpers.submissions_between is now 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 now SubredditStream.submissions()

Removed

  • Removed Reddit’s login 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 and Message.uncollapse is_username_available.

  • Removed captcha related functions.

For changes prior to version 4.0 please see: 3.6.2 changelog