chore(deps): update dependency praw to v8#75
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
ee14d59 to
8ce0d01
Compare
8ce0d01 to
2468a1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==7.8.1→==8.0.2Release Notes
praw-dev/praw (praw)
v8.0.2Compare Source
Changed
deprecated for positional use in v7 are now keyword-only. Maintenance and
documentation only; no functional changes.
v8.0.1Compare Source
Fixed
__all__inprawandpraw.modelsso that, now that PRAW ships apy.typedmarker, type checkers recognize documented imports such asfrom praw import Redditandfrom praw.models import Redditoras public re-exports insteadof reporting them as private.
v8.0.0Compare Source
Added
selftextwhen submitting link, image,gallery, and video posts.
migration guide <praw8_migration>covering all breaking changes in PRAW8.
.Mediaand its subclasses :class:.EmojiMedia, :class:.PostMedia,:class:
.StylesheetAsset, :class:.StylesheetImage, and :class:.WidgetMediatoconsolidate media uploads. Media can be constructed from a file path, or from
bytescontent along with aname, so media no longer has to be written to diskbefore uploading.
.Announcementand :class:.AnnouncementHelper, exposed as:attr:
.Reddit.announcements, for listing, hiding, and marking the currentlyauthenticated user's announcements as read. Provides :meth:
.Announcement.hide,:meth:
.Announcement.mark_read, :meth:.AnnouncementHelper.hide,:meth:
.AnnouncementHelper.mark_read, and :meth:.AnnouncementHelper.mark_all_read.:attr:
.Announcement.sent_datetimeand :attr:.Announcement.read_datetimereturn theannouncement's
sent_atandread_attimestamps as timezone-aware:class:
datetime.datetimeobjects (read_datetimeisNonefor unreadannouncements).
.Redditor.overviewto iterate over a Redditor's combined comments andsubmissions, mirroring the user overview page on Reddit.
exception_handlerkeyword argument to :func:.stream_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.
~.Comment.created_datetimeto objects with a creation time (for example:class:
.Comment, :class:.Submission, :class:.Redditor, :class:.Subreddit,:class:
.Collection, and :class:.ModNote), returning a timezone-aware:class:
datetime.datetime.~.Collection.updated_datetimeto :class:.Collection,:attr:
~.PollData.voting_end_datetimeto :class:.PollData, and:attr:
~.Comment.edited_datetimeto :class:.Commentand :class:.Submission(
Nonewhen the object has not been edited), all returning timezone-aware:class:
datetime.datetimeobjects.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 the
PRAW_ALLOW_ENDPOINT_OVERRIDEenvironment variable.
py.typedmarker (:PEP:561) so that downstream projects can type check againstPRAW's inline annotations.
Changed
Bumped prawcore to 3.0.2.
Drop support for Python 3.8, which was end-of-life on 2024-10-07.
Drop support for Python 3.9, which was end-of-life on 2025-10-31.
Change
Reddit.user.meto raise :class:.ReadOnlyExceptionwhen called in:attr:
.read_onlymode.The
subredditattribute of :class:.Redditoris a :class:.UserSubredditinstance.
The
dataargument toObjector.objectifymust now be passed by keyword.The
mark_readargument tosubreddit.modmail(:class:.ModmailConversation)must now be passed by keyword.
The
flair_typeargument to :class:.SubredditFlairTemplatesmust be passed bykeyword.
The
selftextandurlarguments to :meth:.Subreddit.submitare no longermutually exclusive. When
urlis providedselftextwill be used as optionalbody text to accompany the link submission. An exception is raised when trying to use
inline_mediawithselftextfor aurlsubmission because Reddit does notsupport inline media in body text for link submissions.
Subreddit.submit_video,Subreddit.submit_gallery, andSubreddit.submit_imagenow accept an optional Markdown-formattedselftextparameter.
The
reason_idargument to :class:.RemovalReasonhas been renamed toid.Media upload methods now accept :class:
.Mediainstances instead of file paths:image_pathargument to :meth:.SubredditEmoji.addhas been replaced bymedia, which takes an :class:.EmojiMediainstance.image_patharguments to the :class:.SubredditStylesheetupload_*methods have been replaced by
media, which must be passed positionally.:meth:
.SubredditStylesheet.upload, :meth:.upload_header,:meth:
.upload_mobile_header, and :meth:.upload_mobile_icontake a:class:
.StylesheetImageinstance, while :meth:.upload_banner,:meth:
.upload_banner_additional_image, :meth:.upload_banner_hover_image, and:meth:
.upload_mobile_bannertake a :class:.StylesheetAssetinstance.file_pathargument to :meth:.SubredditWidgetsModeration.upload_imagehasbeen replaced by
media, which takes a :class:.WidgetMediainstance and must bepassed positionally.
pathargument to :class:.InlineMedia(:class:.InlineGif,:class:
.InlineImage, and :class:.InlineVideo) has been replaced bymedia,which takes a :class:
.PostMediainstance.An unknown media type now raises :class:
.ClientExceptionwhen uploading media,instead of falling back to JPEG.
Media uploads to Reddit's S3 buckets now respect the configured
timeoutand raiseprawcore.RequestExceptionon transport errors, consistent with all other requests,instead of having no timeout and raising raw
requestsexceptions.Subreddit.submit_gallery,Subreddit.submit_image,Subreddit.submit_poll,and
Subreddit.submit_videohave been merged into :meth:.Subreddit.submit. Thekind of submission is selected with the
gallery,image,poll,url, orvideokeyword argument. At least one of those, orselftext, must be provided,and they are mutually exclusive, while
selftextmay accompany any of them asoptional Markdown-formatted body text.
imagetakes a :class:.PostMediainstance;gallerytakes a list of :class:.PostMediainstances ordict\ s with amediakey;videotakes a :class:.PostMediainstance or adictwith amediakey and optionalgifandthumbnailkeys; andpolltakes adictwithdurationandoptionskeys.selftextis no longer requiredfor poll submissions.
Require
prawcore >=3.2, <4for its public :class:!Sessionand authorizeraccessors and the widened :meth:
!Session.requestannotations, which let PRAW drop anumber of internal
cast\ s and type-checker suppressions.Constrain the
websocket-clientdependency to<2to avoid silently adopting afuture, potentially breaking, major release.
Require
update_checker >=1.0, <2.0and callupdate_checkwith keywordarguments. The 1.0 release is dependency-free.
:meth:
.Submission.add_fetch_paramnow raises :class:.ClientExceptionwhen calledon 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 a :class:.Submissionmustnow be set before the submission is fetched; setting either after the submission has
been fetched raises :class:
.ClientExceptioninstead of logging a warning.Require
prawcore >=4, <5.Split
praw/models/reddit/subreddit.pyinto apraw.models.reddit.subredditpackage, with :class:
.Subredditand each of its helper classes (:class:.Modmail,:class:
.SubredditFilters, :class:.SubredditFlair, :class:.SubredditModeration,:class:
.SubredditQuarantine, :class:.SubredditRelationship,:class:
.SubredditStream, :class:.SubredditStylesheet, :class:.SubredditWiki, andtheir related classes) moved to dedicated modules. All classes remain importable from
praw.models.reddit.subredditandpraw.modelsfor backwards compatibility. Seethe :ref:
migration guide <praw8_migration>for the full mapping.Fixed
.Submission.hideand :meth:.Submission.unhide.TypeErrorwhen objectifying a response whosejson.errorsfield isnullrather than an empty list (e.g.
api/hide).Removed
Reddit.random_subreddit,Subreddit.random, andSubreddit.random_rising.APIExceptionclass.Comment.awardandSubmission.awardmethods.Comment.gild,Redditor.gild, andSubmission.gildmethods.Redditor.gildedandSubreddit.gildedmethods.Redditor.gildingsmethod.Subreddit.mod.inbox,Subreddit.mod.unread, andSubreddit.mod.stream.unreadmethods.Subreddits.search_by_topicmethod.Subreddits.goldmethod..Redditkeyword argumenttoken_managerand all associated tokenmanagers.
Reddit.validate_on_submitconfiguration attribute.WebSocketException.original_exceptionmethod.afterargument for :meth:.conversations.reset_timestampfrom :meth:.limits.SubredditMessage.muteandSubredditMessage.unmutemethods.InboxableMixin.unblock_subredditmethod.warn_additional_fetch_paramsconfiguration option, which is obsolete now thatadding fetch parameters to an already-fetched submission raises
:class:
.ClientException.warn_comment_sortconfiguration option, which is obsolete now that settingcomment_sortorcomment_limitafter the comments have been fetched raises:class:
.ClientException.v7.8.2Compare Source
Fixed
documentation builds again.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.