Async PRAW follows semantic versioning.
Added
.pin
to manage pinned submissions on the authenticated user's profile..update_display_layout
to update the display layout of posts in a.Collection
..SubredditCollectionsModeration.create
keyword argumentdisplay_layout
for specifying a display layout when creating a.Collection
.~.Message.parent
to get the parent of a.Message
.
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 inparams
keyword argument. - Positional keyword arguments for applicable functions and methods. Starting with Async 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.
Added
- Log a warning if a submission's
comment_sort
attribute is updated after the submission has already been fetched and awarn_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.
.Draft
to represent a submission draft..Draft.delete
to delete drafts..Draft.submit
to submit drafts..Draft.update
to modify drafts..DraftHelper
to fetch or create drafts on new Reddit..DraftList
to represent a list of.Draft
objects.
Deprecated
- Ability to use
.CommentForest
as an asynchronous iterator. .CommentForest.list
no longer needs to be awaited..Submission.comments
no longer needs to be awaited and is now a property.
Fixed
- Fixed return value type of methods returning a listing in
.Subreddit
and its helper classes. - An import error when using Async PRAW in environments where
libsqlite3-dev
is needed to utilizeaiosqlite
package which depends on thesqlite3
builtin.
Deprecated
- The keyword argument
lazy
has been replace byfetch
to consolidate the keyword argument used to explicitly perform a fetch when initializing an object.
Added
~.WikiPage.discussions
to obtain site-wide link submissions that link to the WikiPage..revert
to revert a WikiPage to a specified revision..Inbox.mark_all_read
to mark all messages as read with one API call.~.InboxableMixin.unblock_subreddit
to unblock a subreddit..update_crowd_control_level
to update the crowd control level of a post..moderator_subreddits
, which returns information about the subreddits that the authenticated user moderates, has been restored.- The configuration setting
refresh_token
has been added back. See https://www.reddit.com/r/redditdev/comments/olk5e6/followup_oauth2_api_changes_regarding_refresh/ for more info.
Changed
.Reddit.delete
now accepts theparams
parameter.
Deprecated
.Reddit
keyword argumenttoken_manager
.
Changed
.Reddit
will now be shallow copied when a deepcopy is preformed on it asasyncprawcore.Session
(more specifically, :pyasyncio.AbstractEventLoop
) does not support being deepcopied.
Fixed
- Fixed an issue where some
.RedditBase
objects would be sent in a request as"None"
.
Added
.UserSubreddit
for thesubreddit
attribute of.Redditor
..username_available
checks if a username is available..trusted
to retrieve a.RedditorList
of trusted users..trust
to add a user to the trusted list..distrust
to remove a user from the trusted list..SQLiteTokenManager
(may not work on Windows).
Changed
.moderated
will now objectify all data returned from the API.- The
wiki_edit
endpoint has been changed fromr/{subreddit}/api/wiki/edit/
tor/{subreddit}/api/wiki/edit
. .Redditor.block
no longer needs to retrieve a user's fullname.
Deprecated
- The
subreddit
attribute of.Redditor
is no longer a dict. - Legacy modmail is slated for deprecation by Reddit in June 2021. See https://www.reddit.com/r/modnews/comments/mar9ha/even_more_modmail_improvements/ for more info.
Fixed
- Fixed bug where
.WikiPage.edit
and.SubredditWiki.create
would fail if passedcontent
andreason
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 ofBadRequest
s when the JSON data contained only the keys "reason" and "message". - Fixed bug where
.request
could not handle instances ofBadRequest
s when the response did not contain valid JSON data. - Fixed bug where
~.FullnameMixin.fullname
sometimes returned the wrong fullname.
Added
.Reddit
keyword argumenttoken_manager
..FileTokenManager
and its parent abstract class.BaseTokenManager
.
Deprecated
- The configuration setting
refresh_token
is deprecated and its use will result in a :pyDeprecationWarning
. This deprecation applies in all ways of setting configuration values, i.e., viapraw.ini
, as a keyword argument when initializing an instance of.Reddit
, and via thePRAW_REFRESH_TOKEN
environment variable. To be prepared for Async PRAW 8, use the new.Reddit
keyword argumenttoken_manager
. Seerefresh_token
in Async PRAW's documentation for an example. .me
will no longer returnNone
when called in.read_only
mode starting in Async PRAW 8. A :pyDeprecationWarning
will be issued. To switch forward to the Async PRAW 8 behavior setpraw8_raise_exception_on_me=True
in yourasyncpraw.Reddit(...)
call.
Added
- Add method
.Subreddits.premium
to reflect the naming change in Reddit's API. - Ability to submit image galleries with
~.Subreddit.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
. - Added
.Reddit.close
to close the requestor session. - Ability to use
.Reddit
as an asynchronous context manager that automatically closes the requestor session on exit.
Changed
.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
~.Subreddit.submit_image
and~.Subreddit.submit_video
performance in slow network environments by removing a race condition when establishing a websocket connection.
Deprecated
.Subreddits.gold
is superseded by.Subreddits.premium
..Submission.gild
is superseded by.Submission.award
..Comment.gild
is superseded by.Comment.award
.PRAWException
is superseded by.AsyncPRAWException
.
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.
- A bug where if you call .parent() on a comment it clears its replies.
- An issue where performing a deepcopy on an
.RedditBase
object will fail. - Some cases where streams yield the same item multiple times. This cannot be prevented in every case.
- An issue where streams could get stuck on a deleted item and never pull new items.
- Fix subreddit style asset uploading.
- First official Async PRAW release!
- Initial Async PRAW pre-release.
For changes in PRAW please see: PRAW Changelog