Change Log¶
asyncpraw follows semantic versioning.
8.0.0 (2026/06/14)¶
Added
AnnouncementandAnnouncementHelper, exposed asReddit.announcements, for listing, hiding, and marking the currently authenticated user’s announcements as read. ProvidesAnnouncement.hide(),Announcement.mark_read(),AnnouncementHelper.hide(),AnnouncementHelper.mark_read(), andAnnouncementHelper.mark_all_read().Announcement.sent_datetimeandAnnouncement.read_datetimereturn the announcement’ssent_atandread_attimestamps as timezone-awaredatetime.datetimeobjects (read_datetimeisNonefor unread announcements).created_datetimeto objects with a creation time (for exampleComment,Submission,Redditor,Subreddit,Collection, andModNote), returning a timezone-awaredatetime.datetime.updated_datetimetoCollection,voting_end_datetimetoPollData, andedited_datetimetoCommentandSubmission(Nonewhen the object has not been edited), all returning timezone-awaredatetime.datetimeobjects.An
exception_handlerkeyword argument tostream_generator()(and thus allstreammethods) that is invoked with any exception raised while fetching items, allowing the stream to resume rather than terminate. Re-raise from the handler to stop the stream.Warn when a
praw.iniin the current working directory sets theoauth_urlorreddit_urlendpoint, as such a file can redirect credentials to an untrusted host. The warning can be silenced by setting thePRAW_ALLOW_ENDPOINT_OVERRIDEenvironment variable.Redditor.overview()to iterate over a Redditor’s combined comments and submissions, mirroring the user overview page on Reddit.Add support for Python 3.13.
Add support for Python 3.14.
Add support for optional Markdown-formatted
selftextwhen submitting link, image, gallery and video posts.Add
Mediaand its subclassesEmojiMedia,PostMedia,StylesheetAsset,StylesheetImage, andWidgetMediato consolidate media uploads. Media can be constructed from a file path, or frombytescontent along with aname, so media no longer has to be written to disk before uploading.Support delayed session creation in asyncprawcore 2.5.0+.
Add parameter
fetchtoget_rule()to control whether to fetch the rule data when initializing the rule object.A
py.typedmarker (PEP 561) so that downstream projects can type check against Async PRAW’s inline annotations.
Changed
Drop support for Python 3.9, which was end-of-life on 2025-10-31.
Require
asyncprawcore >=3.1.0, <4for its publicSessionand authorizer accessors and the widenedSession.request()annotations, which let Async PRAW drop a number of internalcasts and type-checker suppressions.Require
update_checker[async] >=1.0, <2.0and perform the update check using its native async API on the first request, instead of a blocking call duringRedditinitialization. The 1.0 release is dependency-free, droppingrequestsfrom Async PRAW’s transitive dependencies.Drop support for Python 3.8, which was end-of-life on 2024-10-07.
Change
Reddit.user.meto raiseReadOnlyExceptionwhen called inread_onlymode.The
subredditattribute ofRedditoris aUserSubredditinstance.The
dataargument toObjector.objectifymust now be passed by keyword.The
mark_readargument tosubreddit.modmail(ModmailConversation) must now be passed by keyword.The
flair_typeargument toSubredditFlairTemplatesmust be passed by keyword.The
selftextandurlarguments toSubreddit.submit()are no longer mutually exclusive. Whenurlis providedselftextwill be used as optional body text to accompany the link submission. An exception is raised when trying to useinline_mediawithselftextfor aurlsubmission because Reddit does not support inline media in body text for link submissions.Subreddit.submit_gallery,Subreddit.submit_image,Subreddit.submit_poll, andSubreddit.submit_videohave been merged intoSubreddit.submit(). The kind of submission is selected with thegallery,image,poll,url, orvideokeyword argument. At least one of those, orselftext, must be provided, and they are mutually exclusive, whileselftextmay accompany any of them as optional Markdown-formatted body text.imagetakes aPostMediainstance;gallerytakes a list ofPostMediainstances ordicts with amediakey;videotakes aPostMediainstance or adictwith amediakey and optionalgifandthumbnailkeys; andpolltakes adictwithdurationandoptionskeys.Media upload methods now accept
Mediainstances instead of file paths:The
image_pathargument toSubredditEmoji.add()has been replaced bymedia, which takes anEmojiMediainstance.The
image_patharguments to theSubredditStylesheetupload_*methods have been replaced bymedia, which must be passed positionally.SubredditStylesheet.upload(),SubredditStylesheet.upload_header(),SubredditStylesheet.upload_mobile_header(), andSubredditStylesheet.upload_mobile_icon()take aStylesheetImageinstance, whileSubredditStylesheet.upload_banner(),SubredditStylesheet.upload_banner_additional_image(),SubredditStylesheet.upload_banner_hover_image(), andSubredditStylesheet.upload_mobile_banner()take aStylesheetAssetinstance.The
file_pathargument toSubredditWidgetsModeration.upload_image()has been replaced bymedia, which takes aWidgetMediainstance and must be passed positionally.The
pathargument toInlineMedia(InlineGif,InlineImage, andInlineVideo) has been replaced bymedia, which takes aPostMediainstance.
An unknown media type now raises
ClientExceptionwhen uploading media, instead of falling back to JPEG.Media uploads to Reddit’s S3 buckets now respect the configured
timeoutand raiseasyncprawcore.RequestExceptionon transport errors, consistent with all other requests, instead of bypassing the configured timeout and raising rawaiohttpexceptions.CommentForest.list()no longer needs to be awaited.The keyword argument
lazyhas been replace byfetchto consolidate the keyword argument used to explicitly perform a fetch when initializing an object.The argument
reason_idinRemovalReason.__init__()has been replaced withidand is now a positional-only argument.The
nameargument inget_emoji()is now a positional-only argument.The
reason_idargument inget_reason()has been replaced withidand is now a positional-only argument.The
short_nameargument inget_rule()is now a positional-only argument.The
update_idargument inget_update()has been replaced withidand is now a positional-only argument.The
page_nameargument inget_page()is now a positional-only argument.The
fetchargument in the following methods is now a keyword-only argument:Submission.add_fetch_param()now raisesClientExceptionwhen called on a submission that has already been fetched, rather than logging a warning, since the added parameters would have no effect.The
comment_sortandcomment_limitattributes of aSubmissionmust now be set before the submission is fetched; setting either after the submission has been fetched raisesClientExceptioninstead of logging a warning. Becausereddit.submission()fetches by default, initialize the submission withfetch=False, set the attributes, then callload().Require
asyncprawcore >=4, <5.Split
asyncpraw/models/reddit/subreddit.pyinto anasyncpraw.models.reddit.subredditpackage, withSubredditand each of its helper classes (Modmail,SubredditFilters,SubredditFlair,SubredditModeration,SubredditQuarantine,SubredditRelationship,SubredditStream,SubredditStylesheet,SubredditWiki, and their related classes) moved to dedicated modules. All classes remain importable fromasyncpraw.models.reddit.subredditandasyncpraw.modelsfor backwards compatibility. See the migration guide for the full mapping.
Fixed
An issue where submitting a gallery post with websockets enabled would fail.
Fix API endpoint for
Submission.hide()andSubmission.unhide(), which returned a 404 due to a trailing slash.Fix
TypeErrorwhen objectifying a response whosejson.errorsfield isnullrather than an empty list (e.g.api/hide).
Removed
The
warn_additional_fetch_paramsconfiguration option, which is obsolete now that adding fetch parameters to an already-fetched submission raisesClientException.The
warn_comment_sortconfiguration option, which is obsolete now that settingcomment_sortorcomment_limitafter the comments have been fetched raisesClientException.Remove
Reddit.random_subreddit,Subreddit.random, andSubreddit.random_rising.Remove
APIExceptionclass.Remove
PRAWExceptionclass rename handler.Remove
Comment.awardandSubmission.awardmethods.Remove
Comment.gild,Redditor.gild, andSubmission.gildmethods.Remove
Redditor.gildedandSubreddit.gildedmethods.Remove
Redditor.gildingsmethod.Remove
Subreddit.mod.inbox,Subreddit.mod.unread, andSubreddit.mod.stream.unreadmethods.Remove
Subreddits.search_by_topicmethod.Remove
Subreddits.goldmethod.Remove
Redditkeyword argumenttoken_managerand all associated token managers.Remove
Reddit.validate_on_submitconfiguration attribute.Remove
WebSocketException.original_exceptionmethod.Remove the
afterargument forconversations().Remove ability to use
CommentForestas an asynchronous iterator.Remove ability to use
Redditas an synchronous context manager.Remove key
reset_timestampfromlimits().Remove
SubredditMessage.muteandSubredditMessage.unmutemethods.Remove
InboxableMixin.unblock_subredditmethod.
7.8.1 (2024/12/21)¶
Changed
Bump asyncprawcore minimum version.
7.8.0 (2024/10/20)¶
Added
reorder()to reorder a subreddit’s link flair templates.reorder()to reorder a subreddit’s redditor flair templates.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_mediakeyword argument to allow Async 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.
stream_generator()now accepts thecontinue_after_idparameter, which starts the stream after a given item ID.Support for new share URL format created from Reddit’s mobile apps.
Reddithas a new configurable parameter,window_size. This tells PRAW how long reddit’s rate limit window is. This defaults to 600 seconds and shouldn’t need to be changed unless reddit changes the size of their rate limit window.
Fixed
An issue where submitting a post with media would fail due to an API change.
Changed
Drop support for Python 3.7, which is end-of-life on 2023-06-27.
Fixed
XML parsing error when media uploads fail.
7.7.1 (2023/07/11)¶
Changed
Drop
asyncio_extrasdependency, usecontextlib.asynccontextmanagerinstead.
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.
Fixed
An issue with iterating
ModNotewhen a user has more than a hundred notes.An issue when uploading media during the submission of a new media post.
Removal reasons are now returned in the same order as they appear on Reddit.
7.6.1 (2022/11/28)¶
Changed
Fixed
An issue where
ModmailConversation’smessagesattribute would only contain the latest message.
7.6.0 (2022/10/23)¶
Added
pin()to manage pinned submissions on the authenticated user’s profile.update_display_layout()to update the display layout of posts in aCollection.SubredditCollectionsModeration.create()keyword argumentdisplay_layoutfor specifying a display layout when creating aCollection.ModNoteto represent a moderator note.ModNote.delete()to delete a single moderator note.RedditModNotesto interact with moderator notes from aRedditinstance. This provides the ability to create and fetch notes for one or more redditors from one or more subreddits.RedditorModNotesto interact with moderator notes from aRedditorinstance.RedditorModNotes.subreddits()to obtain moderator notes from multiple subreddits for a single redditor.SubredditModNotesto interact with moderator notes from aSubredditinstance.SubredditModNotes.redditors()to obtain moderator notes for multiple redditors from a single subreddit.create()to create a moderator note.Redditor.notesto interact withRedditorModNotes.SubredditModeration.notesto interact withSubredditModNotes.create_note()create a moderator note from aCommentorSubmission.author_notes()to view the moderator notes for the author of aCommentorSubmission.
Changed
Drop support for Python 3.6, which is end-of-life on 2021-12-23.
conversations()now returns aListingGeneratorallowing you to page through more than 100 conversations.
Deprecated
The
afterargument forconversations()will now have to be included inparamskeyword 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.
7.5.0 (2021/11/13)¶
Added
Log a warning if a submission’s
comment_sortattribute is updated after the submission has already been fetched and awarn_comment_sortconfig setting to turn off the warning.user_selectable()to get available subreddit link flairs.Automatic RateLimit handling will support errors with millisecond resolution.
Draftto represent a submission draft.Draft.delete()to delete drafts.Draft.submit()to submit drafts.Draft.update()to modify drafts.DraftHelperto fetch or create drafts on new Reddit.
Deprecated
Ability to use
CommentForestas an asynchronous iterator.CommentForest.list()no longer needs to be awaited.Submission.commentsno longer needs to be awaited and is now a property.The keyword argument
lazyhas been replace byfetchto consolidate the keyword argument used to explicitly perform a fetch when initializing an object.
Fixed
Fixed return value type of methods returning a listing in
Subredditand its helper classes.An import error when using Async PRAW in environments where
libsqlite3-devis needed to utilizeaiosqlitepackage which depends on thesqlite3builtin.
7.4.0 (2021/07/30)¶
Added
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_subredditto 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_tokenhas 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 theparamsparameter.
Deprecated
Redditkeyword argumenttoken_manager.
7.3.1 (2021/07/06)¶
Changed
Redditwill now be shallow copied when a deepcopy is preformed on it asasyncprawcore.Session(more specifically,asyncio.AbstractEventLoop) does not support being deepcopied.
Fixed
Fixed an issue where some
RedditBaseobjects would be sent in a request as"None".
7.3.0 (2021/06/18)¶
Added
UserSubredditfor thesubredditattribute ofRedditor.username_available()checks if a username is available.trusted()to retrieve aRedditorListof 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_editendpoint 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
subredditattribute ofRedditorwill no longer function as adict.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()andSubredditWiki.create()would fail if passedcontentandreasonparameters 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 ofBadRequests when the JSON data contained only the keys “reason” and “message”.Fixed bug where
request()could not handle instances ofBadRequests when the response did not contain valid JSON data.Fixed bug where
fullname()sometimes returned the wrong fullname.
7.2.0 (2021/02/25)¶
Added
Redditkeyword argumenttoken_manager.FileTokenManagerand its parent abstract classBaseTokenManager.
Deprecated
The configuration setting
refresh_tokenis deprecated and its use will result in aDeprecationWarning. This deprecation applies in all ways of setting configuration values, i.e., viapraw.ini, as a keyword argument when initializing an instance ofReddit, and via thePRAW_REFRESH_TOKENenvironment variable. To be prepared for Async PRAW 8, use the newRedditkeyword argumenttoken_manager. See Working with Refresh Tokens in Async PRAW’s documentation for an example.Reddit.user.mewill no longer returnNonewhen called inread_onlymode starting in Async PRAW 8. ADeprecationWarningwill be issued. To switch forward to the Async PRAW 8 behavior setpraw8_raise_exception_on_me=Truein yourasyncpraw.Reddit(...)call.
7.1.1 (2021/02/11)¶
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.awardandComment.awardwith 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
Redditas an asynchronous context manager that automatically closes the requestor session on exit.
Changed
BoundedSetwill 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_imageandSubreddit.submit_videoperformance in slow network environments by removing a race condition when establishing a websocket connection.
Deprecated
Subreddits.goldis superseded bySubreddits.premium().Submission.gildis superseded bySubmission.award.Comment.gildis superseded byComment.award.PRAWExceptionis superseded byAsyncPRAWException.
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
RedditBaseobject 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.
7.1.0 (2020/07/16)¶
First official Async PRAW release!
7.1.0.pre1 (2020/07/16)¶
Initial Async PRAW pre-release.
For changes in PRAW please see: PRAW Changelog