The changes listed below are divided into four categories.
- [FEATURE] Something new has been added.
- [BUGFIX] Something was broken before, but is now fixed.
- [REDDIT] A change caused by an upstream change from reddit.
- [CHANGE] Other changes affecting user programs, such as the renaming of a function.
Read r/changelog to be notified of upstream changes.
Visit the changelog on ReadTheDocs for properly formatted links that link to the relevant place in the code overview.
- [FEATURE] :meth:`~praw.__init__.SubmitMixin.submit` now supports a
resubmit
argument to allow the submission of an already submitted url.
- [BUGFIX] Fix incorrect username when building Redditor objects from wikipage submissions.
- [CHANGE] Increase the dependency of
update_checker
to 0.10 or later to prevent ImportWarnings (issue 291).- [CHANGE] :meth:`~.Subreddit.get_banned` now takes a
user_only
argument (default:True
). When the value is explicitly passed asFalse
the return value is not a generator ofRedditor
objects, but a generator of dictionaries whosename
key corresponds to theRedditor
object and whose ban-note is at keynote
.- [FEATURE] Enable gathering of duplicate submissions for a Submission object (issue 290).
- [FEATURE] Add :meth:`praw.__init__.AuthenticatedReddit.delete`.
- [FEATURE] Add
save
OAuth scope to :meth:`~praw.objects.Saveable.save` and :meth:`~praw.objects.Saveable.unsave`.- [BUGFIX] Fix Google AppEngine bug with
platform.platform
.- [REDDIT] Using :meth:`~praw.__init__.UnauthenticatedReddit.get_flair` now requires moderator access. See this r/redditdev thread
- [CHANGE] Increase the dependency of
update_checker
to 0.9 or later.
- [CHANGE] Increase the dependency of
six
to 1.4 or later.
- [FEATURE] Support building wheel binary distributions.
- [FEATURE] :meth:`~praw.__init__.UnauthenticatedReddit.get_submission` and :meth:`~praw.objects.Submission.from_url` now supports url parameters. Both included within the url and explicitly via the "params" argument.
- [CHANGE] The dependency on
update_checker
has been increased to >= 0.8.- [REDDIT] Add support for changes to UserLists on reddit.
- [REDDIT] Using get_flair_list now requires moderator access. See this r/redditdev thread
- [BUGFIX] Fix configuration parsing for
store_json_result
.- [BUGFIX] Fix duplicate bug in :class:`.BoundedSet`.
- [FEATURE] Add :attr:`.json_dict` to :class:`.RedditContentObject`.
- [FEATURE] You can now give configuration settings directly when instantiating a :class:`.BaseReddit` object. See the configuration files
- [BUGFIX] Fixed a bug that caused an
AttributeError
to be raised when using a deprecated method.
- [FEATURE] Added :meth:`~praw.objects.Moderatable.ignore_reports` and :meth:`~praw.objects.Moderatable.unignore_reports` to :class:`.Comment` and :class:`.Submission`.
- [BUGFIX] The
history
scope is not required for :meth:`~praw.objects.Redditor.get_comments`, :meth:`.get_overview` and :meth:`.get_submitted` despite the official reddit documentation saying so. Redditors may choose to make their voting record public, in which case no authentication is required for :meth:`.get_disliked` or :meth:`.get_liked`. Thehistory
scope requirement for the above-mentioned methods has been removed.
- [FEATURE] Add :meth:`.get_new_subreddits` to return the newest subreddits.
- [FEATURE] Add the arguments
save
andsend_replies
to :meth:`~praw.__init__.SubmitMixin.submit`.- [FEATURE] Create and add
history
scope to :meth:`~praw.objects.Redditor.get_comments`, :meth:`.get_disliked`, :meth:`.get_liked`, :meth:`.get_overview`, :meth:`.get_submitted`, :meth:`.get_hidden` and :meth:`.get_saved`.
- [FEATURE] :meth:`mark_as_nsfw` and :meth:`unmark_as_nsfw` can now be used if the currently authenticated user is the author of the Submission.
- [FEATURE] :meth:`~.ModOnlyMixin.get_contributors` can now be used for accessing the contributor list of protected/private subreddits without requiring moderator access. See issue issue 246.
- [BUGFIX] Fixed :class:`.Comment` erroneously having the methods
mark_as_nsfw
andunmark_as_nsfw
, despite comments not being able to be marked as NSFW.- [REDDIT] Update :meth:`.get_subreddit_recommendations` to handle changed returned data format.
- [FEATURE] Add :meth:`.get_subreddit_recommendations` to get a recommendation of subreddits based on a list of provided subreddits.
- [FEATURE] :class:`.Subreddit` now has an
__repr__
method. So it's now possible to identify what subreddit the object represents from the human readable representation of the object.- [FEATURE] Add :meth:`praw.__init__.UnauthenticatedReddit.get_rising` that returns the rising listing of the front page in the context of the currently logged-in user (if any).
- [FEATURE] Add methods :meth:`.set_contest_mode` and :meth:`.unset_contest_mode` to :class:`.Submission`, for (un)setting of contest modes. See this Reddit post for information about contest mode.
- [FEATURE] Move methods :meth:`.get_liked` and :meth:`.get_liked` to :class:`.Redditor` from :class:`.LoggedInRedditor`. Redditors can make their likes and dislikes public. Having :meth:`.get_liked` and :meth:`.get_liked` on :class:`.Redditor` allows PRAW to access this info.
- [FEATURE] The
has_fetched
attribute has been added to all objects save :class:`.Reddit`, see the lazy loading page in PRAW's documentation for more details.- [BUGFIX] Fixed a bug that caused the
timeout
configuration setting to always be the default 45 irrespective of what it was set to inpraw.ini
.
- [BUGFIX] PRAW automatically retries failed requests to reddit if the error is likely to be a temporary one. This resulted in spamming reddit if the error occurred after content had been saved to reddit's database. Therefore the following methods will no longer retry failed request :meth:`~praw.__init__.ModConfigMixin.upload_image`, :meth:`~praw.__init__.PrivateMessagesMixin.send_message`, :meth:`~praw.__init__.SubmitMixin.submit`, :meth:`~praw.__init__.UnauthenticatedReddit.send_feedback`, :meth:`~praw.objects.Inboxable.reply` and :meth:`~praw.objects.Submission.add_comment`. Additionally :meth:`~praw.__init__.BaseReddit.request_json` now has the
retry_on_error
argument, which if set toTrue
will prevent retries of the request if it fails.
- [FEATURE] :meth:`~praw.__init__.AuthenticatedReddit.select_flair` method added, can be used to change your flair without moderator access on subreddits that allow it.
- [FEATURE] Add :meth:`~praw.objects.Submission.sticky` and :meth:`~praw.objects.Submission.unsticky` to sticky and unsticky a submission to the top of a subreddit.
- [FEATURE] Add arguments syntax and period to :meth:`~praw.__init__.UnauthenticatedReddit.search`.
- [FEATURE] PRAW will now try to use the http_proxy environment variable for proxy settings, if no proxy is set in the configuration file.
- [BUGFIX] :meth:`~praw.__init__.ModOnlyMixin.get_stylesheet` erroneously required moderator access. It now just requires that the authenticated user has access to the subreddit.
- [BUGFIX] Fix bug that prevented the usage of :meth:`~praw.objects.Subreddit.search` when called from :obj:`.Subreddit`.
- [FEATURE] :meth:`~praw.__init__.ModOnlyMixin.get_mod_mail` can now be used to get moderator mail from individual subreddits, instead of all moderated subreddits, just like :meth:`~praw.__init__.ModOnlyMixin.get_mod_queue`.
- [FEATURE] Added :meth:`~.get_mentions` which is a :meth:`.get_content` generator for username mentions. Only usable if the authenticated user has gold.
- [BUGFIX] Fixed an error in :meth:`~praw.__init__.ModOnlyMixin.get_mod_queue`, :meth:`~praw.__init__.ModOnlyMixin.get_reports`, :meth:`~praw.__init__.ModOnlyMixin.get_spam` and :meth:`~praw.__init__.ModOnlyMixin.get_unmoderated` when calling them from :obj:`.Reddit` without giving the subreddit argument explicitly.
- [REDDIT] New fields
public_traffic
added to :meth:`~.Subreddit.set_settings` as per the upstream change.
- [FEATURE] Added :meth:`.UnauthenticatedReddit.get_random_submission`.
- [BUGFIX] Verify that
sys.stdin
hasclosed
attribute before checking if the stream is closed.
- [BUGFIX] Avoid occasionally processing duplicates in :meth:`~praw.helpers.comment_stream`.
- [CHANGE] :meth:`~praw.helpers.comment_stream` yields comments in a consitent order (oldest to newest).
- [FEATURE] Support fetching submission listings for domains via :meth:`.get_domain_listing`.
- [FEATURE] Added :meth:`praw.helpers.comment_stream` to provide a neverending stream of new comments.
- [BUGFIX] Don't cache requests whose responses will result in an exception. This bug was introduced in version 2.1.0.
- [FEATURE] PRAW now supports proper rate-limiting and shared caching when running multiple processes. See :ref:`multiprocess` for usage information.
- [CHANGE] Remove explicit
limit
parameters from functions that utilize :meth:`.get_content` but don't alter the limit. This change will result in broken code if the calling code utilizes positional instead of keyword arguments.- [CHANGE] :meth:`~.UnauthenticatedReddit.get_flair` returns
None
when the redditor does not exist.- [CHANGE] Deprecated :meth:`.get_all_comments`. Use :meth:`~.UnauthenticatedReddit.get_comments` with
all
as the subreddit argument.- [CHANGE] Deprecated :meth:`.get_my_reddits`. Use :meth:`.get_my_subreddits` instead.
- [CHANGE] Deprecated :meth:`.get_popular_reddits`. Use :meth:`.get_popular_subreddits` instead.
- [BUGFIX] Allow editing non-top-level wiki pages fetched using :meth:`.Subreddit.get_wiki_page`.
- [BUGFIX] Fix a bug in :meth:`~Subreddit.submit`. See praw-dev#213.
- [BUGFIX] Fix a python 3.3 bug in :meth:`~.Subreddit.upload_image`. See praw-dev#211.
- [FEATURE] PRAW can now use a proxy server, see #206. The parameter
http_proxy
(optional) has been added to the configuration file to define a proxy server in the form host:ip or http://login:user@host:ip.
- [BUGFIX] Prevent potential invalid redirect exception when using :meth:`~.Subreddit.get_wiki_page`.
- [FEATURE] Added :meth:`.get_submissions` to batch convert fullnames (
t3_bas36id
) into :class:`.Submission` objects.- [FEATURE] Added :meth:`~.Subreddit.get_wiki_banned` to get a list of wiki banned users.
- [FEATURE] Added :meth:`.add_wiki_ban` and :meth:`.remove_wiki_ban` to manage the list of wiki banned users.
- [FEATURE] Added :meth:`~.Subreddit.get_wiki_contributors` to get a list of wiki contributors.
- [FEATURE] Added :meth:`.add_wiki_contributor` and :meth:`.remove_wiki_contributor` to manage the list of wiki contributors.
- [FEATURE] Added :meth:`~.Subreddit.get_wiki_page` to fetch an individual WikiPage.
- [FEATURE] Added :meth:`~.Subreddit.get_wiki_pages` to get a list of WikiPage objects.
- [FEATURE] Wiki pages can be edited through either the :meth:`.WikiPage.edit` method of an already existing WikiPage object, or through the :meth:`~.Subreddit.edit_wiki_page` function. :meth:`~.Subreddit.edit_wiki_page` is also used to create new wiki pages.
- [CHANGE] Deprecated :meth:`.ban`, :meth:`.unban`, :meth:`.make_contributor`, and :meth:`.make_moderator` in favor of the consistently named :meth:`.add_ban`, :meth:`.remove_ban`, :meth:`.add_contributor`, and :meth:`.add_moderator` respectively.
- [FEATURE] PRAW can now decode HTML entities, see #186. The parameter
decode_html_entities
(defaultFalse
) has been added to the configuration file to control whether this feature is activated.- [FEATURE] Add :exc:`.InvalidSubreddit` exception which is raised when attempting to get a listing for a nonexistent subreddit.
- [FEATURE] All functions that use the :meth:`.get_content` generator function now take
*args, **kwargs
.- [BUGFIX] Requesting user specific data such as :meth:`.get_unread` while OAuthenticated as a user, then switching OAuthentication to another user and re-requesting the data within
cache_timeout
would return the cached results matching the previously authenticated user.- [BUGFIX] :meth:`.friend` and :meth:`.unfriend` used to raise an
AttributeError
when called without user/pswd authentication. It now properly raises :exc:`.LoginRequired`.
- [FEATURE] Add the
raise_captcha_exception
argument to :obj:`.RequireCaptcha` decorator. Whenraise_captcha_exception
isTrue
(defaultFalse
), PRAW wil not prompt for the captcha information but instead raise a :exc:`.InvalidCaptcha` exception.- [REDDIT] An upstream change has split new and rising into their own independent listings. Use the new :meth:`.praw.objects.Subreddit.get_rising` method instead of the old :meth:`.get_new_by_rising` and :meth:`~.Subreddit.get_new` instead of :meth:`.get_new_by_date`.
- [CHANGE] The dependency on
update_checker
has been increased from >= 0.4 to >= 0.5.- [BUGFIX] After inviting a moderator invite, the cached set of moderated subreddits would not be updated with the new subreddit. Causing :func:`.restrict_access` to prevent performing moderater actions in the subreddit.
- [FEATURE] Add :meth:`~.Subreddit.delete_flair` method to :class:`.Subreddit` and :class:`.Reddit` objects.
- [FEATURE] Add parameter
update_user
(default False) to :meth:`.get_unread` if it andunset_has_mail
are both True, then theuser
object in the :class:`.Reddit` object will have itshas_mail
attribute set toFalse
.- [FEATURE] Add :meth:`.get_friends` and :meth:`.get_blocked` to :class:`.LoggedInRedditor`.
- [FEATURE] Add the read scope to :meth:`.get_all_comments` in the :class:`.Reddit` object.
- [FEATURE] Add the read scope to :meth:`~.Subreddit.get_comments` and the subreddit listings such as :meth:`~.Subreddit.get_new` in the :meth:`.Reddit` and :meth:`.Subreddit` object.
- [BUGFIX] Fix bug in :meth:`.MoreComments.comments`.
- [CHANGE] Break :meth:`.get_friends` and :meth:`~.Subreddit.get_banned` until there is an upstream fix to mean that does not require ssl for those endpoints.
- [FEATURE] Add
unset_has_mail
parameter to :meth:`.get_unread`, if it's set toTrue
, then it will sethas_mail
for the logged-in user toFalse
.
- [REDDIT] A reddit update broke PRAW's ability to use :meth:`.login` if it was authenticated as a logged-in user. This update adds the ability to re-login.
- [CHANGE] :meth:`~.Subreddit.get_flair_list` can now be used when logged-in as a regular user, being logged in as a mod of the subreddit is no longer required.
- [FEATURE] Add the :meth:`~.Subreddit.get_unmoderated` method to :class:`.Subreddit` and base reddit objects. This returns a listings of submissions that haven't been approved/removed by a moderator.
- [FEATURE] Add the parameter
gilded_only
to :meth:`~.Subreddit.get_comments` and :meth:`.get_all_comments` methods in :class:`.Subreddit` and base reddit objects. Ifgilded_only
is set toTrue
, then only gilded comments will be returned.- [FEATURE] Add :meth:`~.Reddit.get_comments` method to Reddit object. It works like :meth:`~.Subreddit.get_comments` in Subreddit objects except it takes the subreddit as the first argument.
- [BUGFIX] Fix python 3 failure within the test suite introduced in 2.0.3.
- [FEATURE] Add :meth:`~.Subreddit.delete_image` method to :class:`.Subreddit` objects (also callable on the base reddit object with the subreddit as the first argument).
- [CHANGE] PRAW now requires version 0.4 of
update_checker
.
- [BUGFIX] Fixed bug when comparing :class:`.MoreComments` classes in Python 3.x.
- [BUGFIX] Fix bug with
limit=None
in method :meth:`.replace_more_comments` in :class:`.Submission` object.
- [FEATURE] Support reddit OAuth2 scopes (passwordless authentication). See :ref:`oauth` for usage information.
- [FEATURE] Maximize the number of items fetched when explicit limits are set thus reducing the number of requests up to 4x in some cases.
- [FEATURE] Add the following API methods to :class:`.Subreddit` objects (also callable on the base reddit object with the subreddit as the first argument):
- :meth:`~.Subreddit.accept_moderator_invite` -- accept a pending moderator invite.
- :meth:`~.Subreddit.get_mod_log` -- return ModAction objects for each item (run vars(item), to see available attributes).
- :meth:`~.Subreddit.configure_flair` -- interface to subreddit flair options.
- :meth:`~.Subreddit.upload_image` -- upload an image for the subreddit header or use in CSS.
- [FEATURE] Support 'admin' and special distinguishing of items via :meth:`.distinguish`.
- [FEATURE] Ability to specify max-character limit for object-to-string representations via
output_chars_limit
inpraw.ini
.- [CHANGE] Remove
comments_flat
property of :class:`.Submission` objects. The new :meth:`praw.helpers.flatten_tree` can be used to flatten comment trees.- [CHANGE] Remove
all_comments
andall_comments_flat
properties of Submission objects. The now public method :meth:`.replace_more_comments` must now be explicitly called to replace instances of :class:`.MoreComments` within the comment tree.- [CHANGE] The
content_id
attribute of :class:`.RedditContentObject` has been renamed to :attr:`.fullname`.- [CHANGE] The
info
base Reddit instance method has been renamed to :meth:`.get_info`.- [CHANGE]
get_saved_links
has been renamed to :meth:`.get_saved` and moved to the :class:`.LoggedInRedditor` (r.user
) namespace.- [CHANGE] The Subreddit
get_info
method has been renamed to :meth:`.from_url` and supports parameters for changing the number of comments to fetch and by what sort method.- [CHANGE] The :meth:`.get_submission` method also now supports parameters for changing the number of comments to fetch and by what sort method.
- [CHANGE] :meth:`.mark_as_nsfw` and :meth:`.unmark_as_nsfw` can no longer be used on :class:`.Subreddit` objects. Use
update_settings(nsfw=True)
instead.- [CHANGE] Remove depreciated method
compose_message
.- [CHANGE] Refactored and add a number of exception classes (docs, source) This includes the renaming of:
BadCaptcha
to :exc:`.InvalidCaptcha`.NonExistantUser
to :exc:`.InvalidUser`.- [CHANGE] Simplify content-limit handling and remove the following no-longer necessary parameters from
praw.ini
:
comment_limit
comment_sort
default_content_limit
gold_comments_max
more_comments_max
regular_comments_max
- [CHANGE] Move the following methods from :class:`.LoggedInRedditor` to base reddit object.
- [FEATURE] Add support for r/random.
- [FEATURE] Added the functions :meth:`.hide` and :meth:`.unhide` to :class:`.Submission`.
- [FEATURE] Added function :meth:`.is_username_available` to :class:`.Reddit`.
- [FEATURE] Extended functionality to Python 3.3.
- [BUGFIX] Fixed non-equality bug. Before comparing two PRAW objects with != would always return
True
.- [FEATURE] Added the function
my_contributions
to :class:`.LoggedInRedditor`. Use this to find the subreddits where the user is an approved contributor.- [CHANGE] Voting on something will now force the next call to :meth:`.get_liked` or :meth:`.get_disliked` to re-query from the reddit rather than use the cache.
- [FEATURE] Support for optional 'prev' values added.
- [FEATURE] Added :meth:`~.Subreddit.get_top` to :class:`.Reddit`.
- [FEATURE] Allow for the OS to not be identified when searching for
praw.ini
.
- [FEATURE] Added the functions :meth:`.mark_as_nsfw` and :meth:`.unmark_as_nsfw` to :class:`.Submission` and :class:`.Subreddit`.
- [CHANGE] Printing a :class:`.Submission` to
sys.stdout
will now limit the output length to 80 chars, just like :class:`.Comment` does.- [FEATURE] The maximum amount of comments that can be retrieved alongside a submission for gold and regular accounts has been exported to
praw.ini
.- [REDDIT] Checks for login/moderator in :meth:`~.Subreddit.get_moderators` and :meth:`~.Subreddit.get_flair` for Subreddit are no longer necessary.
- [FEATURE] Added the function :meth:`.refresh` to :class:`.Submission`, :class:`.Subreddit` and :class:`.Redditor`. This will make PRAW re-query either reddit or the cache, depending on whether the last call was within
cache_timeout
, for the latest values and update the objects values.- [FEATURE] Added functions :meth:`.get_liked`, :meth:`.get_disliked` and :meth:`.get_hidden` to :class:`.LoggedInRedditor` to allow you to get the Things the user has upvoted, downvoted or hidden.
- [BUGFIX] Temporary bugfix until prevstyles become optional.
- [FEATURE] Added prevstyle to set_stylesheet requests.
- [BUGFIX] Putting in
user
orpswd
topraw.ini
without values will no longer make it impossible to login.- [FEATURE] You can now have just
user
filled out inpraw.ini
to ease login while remaining safe.
- [REDDIT] New fields
prev_description_id
andprev_public_description_id
added to :meth:`~.Subreddit.set_settings` as per the upstream change.
- [CHANGE]
compose_message
has been renamed to :meth:`~.PrivateMessagesMixin.send_message` in :class:`.Reddit` and :class:`.LoggedInRedditor`.compose_message
is now depreciated and will be removed around the end of 2012.
- [FEATURE] :meth:`.get_popular_reddits` added to :class:`.Reddit`.
- [FEATURE] Added :meth:`~.UnauthenticatedReddit.get_new` and :meth:`~.UnauthenticatedReddit.get_controversial` to :class:`.Reddit`.
- [REDDIT] The logged in / moderator checks for
flair_list
in :class:`.Reddit` are no longer needed and have been removed.
- [FEATURE] :attr:`.score` property wrapped function have been added to :class:`.Comment`.
- [FEATURE]
require_moderator
decorator now supports multi-reddits.- [FEATURE] Rudimentary logging of the http requests have been implemented.