Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency praw to v7 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update dependency praw to v7 #14

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 20, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
praw (changelog) 4.6.0 -> 7.8.0 age adoption passing confidence

Release Notes

praw-dev/praw (praw)

v7.8.0

Compare Source

Added

  • :meth:~.SubredditLinkFlairTemplates.reorder to reorder a subreddit's link flair
    templates.
  • :meth:~.SubredditRedditorFlairTemplates.reorder to reorder a subreddit's redditor
    flair templates.
  • :func:.stream_generator now accepts the continue_after_id parameter, which
    starts the stream after a given item ID.
  • Support for new share URL format created from Reddit's mobile apps.
  • :class:.Reddit has 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.

v7.7.1

Compare Source

Fixed

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

v7.7.0

Compare Source

Added

  • :meth:.delete_mobile_banner to delete mobile banners.

  • :meth:.upload_mobile_banner to upload mobile banners.

  • Experimental :meth:~.Submission._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 :meth:.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 :class:.ModNote when a user has more than a hundred notes.
  • Removal reasons are now returned in the same order as they appear on Reddit.

v7.6.1

Compare Source

Changed

  • Revert :meth:~.Comment.edit positional argument deprecation.
  • Revert :meth:~.Comment.reply positional argument deprecation.
  • Revert :meth:~.Message.reply positional argument deprecation.
  • Revert :meth:~.Submission.edit positional argument deprecation.
  • Revert :meth:~.Submission.reply positional argument deprecation.

Fixed

  • An issue where :class:.ModmailConversation's messages attribute would only
    contain the latest message.

v7.6.0

Compare Source

Added

  • :meth:.pin to manage pinned submissions on the authenticated user's profile.
  • :meth:.update_display_layout to update the display layout of posts in a
    :class:.Collection.
  • :meth:.SubredditCollectionsModeration.create keyword argument display_layout for
    specifying a display layout when creating a :class:.Collection.
  • :attr:~.Message.parent to get the parent of a :class:.Message.
  • :class:.ModNote to represent a moderator note.
  • :meth:.ModNote.delete to delete a single moderator note.
  • :class:.RedditModNotes to interact with moderator notes from a :class:.Reddit
    instance. This provides the ability to create and fetch notes for one or more
    redditors from one or more subreddits.
  • :class:.RedditorModNotes to interact with moderator notes from a :class:.Redditor
    instance.
  • :meth:.RedditorModNotes.subreddits to obtain moderator notes from multiple
    subreddits for a single redditor.
  • :class:.SubredditModNotes to interact with moderator notes from a
    :class:.Subreddit instance.
  • :meth:.SubredditModNotes.redditors to obtain moderator notes for multiple redditors
    from a single subreddit.
  • :meth:~.BaseModNotes.create to create a moderator note.
  • :attr:.Redditor.notes to interact with :class:.RedditorModNotes.
  • :attr:.SubredditModeration.notes to interact with :class:.SubredditModNotes.
  • :meth:~.ModNoteMixin.create_note create a moderator note from a :class:.Comment or
    :class:.Submission.
  • :meth:~.ModNoteMixin.author_notes to view the moderator notes for the author of a
    :class:.Comment or :class:.Submission.

Changed

  • Drop support for Python 3.6, which is end-of-life on 2021-12-23.
  • :meth:.conversations now returns a :class:.ListingGenerator allowing you to page
    through more than 100 conversations.

Deprecated

  • The after argument for :meth:.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.

v7.5.0

Compare Source

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.
  • :meth:.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 :meth:.Draft.submit would
    not have an effect.

v7.4.0

Compare Source

Added

  • :meth:~.WikiPage.discussions to obtain site-wide link submissions that link to the
    WikiPage.
  • :meth:.revert to revert a WikiPage to a specified revision.
  • :meth:.Inbox.mark_all_read to mark all messages as read with one API call.
  • :meth:~.InboxableMixin.unblock_subreddit to unblock a subreddit.
  • :meth:.update_crowd_control_level to update the crowd control level of a post.
  • :meth:.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.
  • :class:.Draft to represent a submission draft.
  • :meth:.Draft.delete to delete drafts.
  • :meth:.Draft.submit to submit drafts.
  • :meth:.Draft.update to modify drafts.
  • :class:.DraftHelper to fetch or create drafts on new Reddit.
  • :class:.DraftList to represent a list of :class:.Draft objects.

Changed

  • :meth:.Reddit.delete now accepts the params parameter.

Deprecated

  • :class:.Reddit keyword argument token_manager.

v7.3.0

Compare Source

Added

  • :class:.UserSubreddit for the subreddit attribute of :class:.Redditor.
  • :meth:.username_available checks if a username is available.
  • :meth:.trusted to retrieve a :class:.RedditorList of trusted users.
  • :meth:.trust to add a user to the trusted list.
  • :meth:.distrust to remove a user from the trusted list.
  • :class:.SQLiteTokenManager (may not work on Windows).

Changed

  • :meth:.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.
  • :meth:.Redditor.block no longer needs to retrieve a user's fullname.

Deprecated

Fixed

  • Fixed bug where :meth:.WikiPage.edit and :meth:.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 :meth:.request could not handle instances of BadRequest\ s when
    the JSON data contained only the keys "reason" and "message".
  • Fixed bug where :meth:.request could not handle instances of BadRequest\ s when
    the response did not contain valid JSON data.
  • Fixed bug where :meth:~.FullnameMixin.fullname sometimes returned the wrong
    fullname.

v7.2.0

Compare Source

Added

  • :class:.Reddit keyword argument token_manager.
  • :class:.FileTokenManager and its parent abstract class :class:.BaseTokenManager.

Deprecated

  • The configuration setting refresh_token is deprecated and its use will result in a
    :py:class: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 :class:.Reddit, and via the PRAW_REFRESH_TOKEN environment
    variable. To be prepared for PRAW 8, use the new :class:.Reddit keyword argument
    token_manager. See :ref:refresh_token in PRAW's documentation for an example.
  • :meth:.me will no longer return None when called in :attr:.read_only mode
    starting in PRAW 8. A :py:class:DeprecationWarning will be issued. To switch forward
    to the PRAW 8 behavior set praw8_raise_exception_on_me=True in your
    :class:.Reddit call.

v7.1.4

Compare Source

Fixed

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

v7.1.3

Compare Source

Changed

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

v7.1.2

Compare Source

Fixed

  • Asynchronous check would not work on Python 3.6 as
    :py:func:~asyncio.get_running_loop only exists on Python 3.7+.

v7.1.1

Compare Source

Added

  • Add method :meth:.Subreddits.premium to reflect the naming change in Reddit's API.
  • Ability to submit image galleries with :meth:~.Subreddit.submit_gallery.
  • Ability to pass a gallery url to :meth:.Reddit.submission.
  • Ability to specify modmail mute duration.
  • Add method :meth:.invited to get invited moderators of a subreddit.
  • Ability to submit text/self posts with inline media.
  • Add method :meth:.Submission.award and :meth:.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
    :meth:.Reddit.info.
  • A check to see if PRAW is running in an asynchronous environment and will advise the
    user to use Async PRAW <https://asyncpraw.readthedocs.io>_. 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.
  • :class:.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 :meth:~.Subreddit.submit_image and :meth:~.Subreddit.submit_video
    performance in slow network environments by removing a race condition when
    establishing a websocket connection.

Deprecated

  • :meth:.Subreddits.gold is superseded by :meth:.Subreddits.premium.
  • :meth:.Submission.gild is superseded by :meth:.Submission.award.
  • :meth:.Comment.gild is superseded by :meth:.Comment.award.

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.

v7.1.0

Compare Source

Added

  • :class:.Rule to represent one rule of a subreddit.
  • :class:.SubredditRules to get and add rules.
  • Ability to submit polls with :meth:~.Subreddit.submit_poll.
  • :class:.PollData and :class:.PollOption.
  • Ability to view poll data and poll options via the .poll_data attribute on poll
    submissions.
  • Add method :meth:~.Reddit.delete to :class:.Reddit class to support HTTP DELETE
    requests.
  • Added :class:.CalendarConfiguration to represent the configuration of a
    :class:.Calendar widget.
  • Added :class:.Hover to represent the hover state of a :class:.Button.
  • Added :class:.Styles to represent widget styling information.
  • Ability to stream live thread updates via new class :class:.LiveThreadStream with
    method :meth:~.LiveThreadStream.updates.

Changed

  • :meth:.RemovalReason.update's parameters are now optional.
  • :meth:.SubredditRemovalReasons.__getitem__ now takes integers and slices to get
    removal reasons from the list of reasons as returned by Reddit.

Deprecated

  • :attr:.WebSocketException.original_exception is deprecated and slated for removal in
    PRAW 8.0.

Fixed

  • An issue where certain subreddit settings could not be set through
    :meth:.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 BadRequest\ s captured by PRAW that do not contain any detailed JSON
    data are re-raised as the original BadRequest.
  • :meth:~.Subreddit.submit_image and :meth:~.Subreddit.submit_video will throw
    :class:.MediaPostFailed when Reddit fails to post an image or video post.

v7.0.0

Compare Source

Added

  • config_interpolation parameter for :class:.Reddit supporting basic and extended
    modes.
  • Add :meth:.partial_redditors that returns lightweight redditor objects that contain
    only a few fields. This is useful for resolving :class:.Redditor IDs to their
    usernames in bulk.
  • :meth:.User.friends has a new parameter user that takes either an instance of
    :class:.Redditor or a string containing a redditor name and returns an instance of
    :class:.Redditor if the authenticated user is friends with the user, otherwise
    throws an exception.
  • :meth:.SubmissionModeration.flair has the parameter flair_template_id for
    applying flairs with template IDs.
  • :meth:.Emoji.update supports modifying an emoji's permissions.
  • :meth:.SubredditEmoji.add now supports optionally passing booleans to set an emoji's
    permissions upon upload.
  • Methods :meth:.SubredditLinkFlairTemplates.update and
    :meth:.SubredditRedditorFlairTemplates.update contain a new parameter, fetch,
    that toggles the automatic fetching of existing data from Reddit. It is set to True by
    default.
  • Values in methods :meth:.SubredditLinkFlairTemplates.update and
    :meth:.SubredditRedditorFlairTemplates.update that are left as the defaults will no
    longer be over-written if the fetch parameter is set to True, but will fill in
    existing values for the flair template.
  • The parameter text for methods :meth:.SubredditLinkFlairTemplates.update and
    :meth:.SubredditRedditorFlairTemplates.update is no longer required.
  • There is a new method, :meth:~.Subreddit.post_requirements, to fetch a subreddit's
    post requirements.
  • Method :meth:.SubmissionModeration.sticky will now ignore the Conflict exception
    generated by trying to sticky the same post multiple times.
  • A new method :meth:.CommentModeration.show will uncollapse a comment that was
    collapsed because of Crowd Control
  • Methods :meth:~.Subreddit.submit_image and :meth:~.Subreddit.submit_video will
    throw :class:.TooLargeMediaException if the submitted media is rejected by Reddit
    due to the size of the media.
  • Class :class:.Reddit has an attribute, validate_on_submit, that can be set after
    class initialization that causes methods :meth:~.Subreddit.submit,
    :meth:~.Subreddit.submit_image, :meth:~.Subreddit.submit_video, and
    :meth:.Submission.edit to check that the submission matches a subreddit's post
    validation rules. This attribute will be functionally useless once Reddit implements
    their change. This attribute will be deprecated on the next release after Reddit's
    change, and will be removed on the next major release after Reddit's change.

.. warning::

In May-June 2020, Reddit will force all submissions to run through a subreddit's
validation rules.
  • Introduced a data class, :class:.RedditErrorItem, to represent an individual error
    item returned from Reddit.
  • Class :class:.RedditAPIException now serves as a container for the
    :class:.RedditErrorItem\ s. You can access the items by doing
    RedditAPIException.items, which returns a list.
  • :class:.APIException is an alias to :class:.RedditAPIException.
  • Parameter discussion_type to methods :meth:~.Subreddit.submit,
    :meth:~.Subreddit.submit_image, and :meth:~.Subreddit.submit_video to support
    submitting as a live discussion (set to "CHAT").
  • Instances of :class:.Trophy can be compared for equality with each other.
  • :class:.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
    :class:.RedditAPIException.
  • :class:.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
    :class:.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

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

Fixed

  • :meth:.SubredditFlair.update will not error out when the flair text contains quote
    marks.

Removed

  • Converting :class:.APIException to string will no longer escape unicode characters.
  • Module praw.models.modaction no longer exists. Please use the module
    praw.models.mod_action, or directly import ModAction from praw.models.
  • Methods :meth:.SubredditLinkFlairTemplates.update and
    :meth:.SubredditRedditorFlairTemplates.update will no longer create flairs that are
    using an invalid template id, but instead throw a :class:.InvalidFlairTemplateID.
  • Method reddit.user.moderator_subreddits has been removed. Please use
    :meth:.moderated instead.

v6.5.1

Compare Source

Fixed

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

v6.5.0

Compare Source

Added

  • :meth:.set_original_content supports marking a submission as original content.
  • :meth:.unset_original_content supports unmarking a submission as original content.
  • :meth:.moderated to get a list of a redditor's moderated subreddits.
  • Parameter without_websockets to :meth:~.Subreddit.submit_image and
    :meth:~.Subreddit.submit_video to submit without using WebSockets.
  • :meth:.Reddit.redditor supports fullname param to fetch a :class:.Redditor by
    the fullname instead of name. :class:.Redditor constructor now also has fullname
    param.
  • Add :class:.RemovalReason and :class:.SubredditRemovalReasons to work with removal
    reasons
  • Attribute removal_reasons to :class:.SubredditModeration to interact with new
    removal reason classes
  • Parameters mod_note and reason_id to :meth:~.ThingModerationMixin.remove to
    optionally apply a removal reason on removal
  • Add :class:.SubredditModerationStream to enable moderation streams
  • Attribute stream to :class:.SubredditModeration to interact with new moderation
    streams
  • Add :meth:~.SubredditModerationStream.edited to allow streaming of
    :meth:.SubredditModeration.edited
  • Add :meth:~.SubredditModerationStream.log to allow streaming of
    :meth:.SubredditModeration.log
  • Add :meth:~.SubredditModerationStream.modmail_conversations to allow streaming of
    :meth:.Modmail.conversations
  • Add :meth:~.SubredditModerationStream.modqueue to allow streaming of
    :meth:.SubredditModeration.modqueue
  • Add :meth:~.SubredditModerationStream.reports to allow streaming of
    :meth:.SubredditModeration.reports
  • Add :meth:~.SubredditModerationStream.spam to allow streaming of
    :meth:.SubredditModeration.spam
  • Add :meth:~.SubredditModerationStream.unmoderated to allow streaming of
    :meth:.SubredditModeration.unmoderated
  • Add :meth:~.SubredditModerationStream.unread to allow streaming of
    :meth:.SubredditModeration.unread
  • Parameter exclude_before to :func:.stream_generator to allow
    :meth:~.SubredditModerationStream.modmail_conversations to work
  • Parameters allowable_content and max_emojis to
    :meth:~.SubredditRedditorFlairTemplates.add,
    :meth:~.SubredditLinkFlairTemplates.add, and
    :meth:~.SubredditFlairTemplates.update, as well as its child classes.

Deprecated

  • Method reddit.user.moderator_subreddits as :meth:.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.

v6.4.0

Compare Source

Added

  • :meth:.crosspost support parameter flair_id to flair the submission immediately
    upon crossposting.
  • :meth:.crosspost support parameter flair_text to set a custom text to the flair
    immediately upon crossposting.
  • :meth:.crosspost support parameter nsfw to mark the submission NSFW immediately
    upon crossposting.
  • :meth:.crosspost support parameter spoiler to mark the submission as a spoiler
    immediately upon crossposting.

Fixed

  • :meth:.add_community_list has parameter description to support unannounced
    upstream Reddit API changes.
  • :meth:.WidgetModeration.update supports passing a list of :class:.Subreddit
    objects.

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.

v6.3.1

Compare Source

Removed

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

v6.2.0

Compare Source

Added

  • :meth:.upload_banner
  • :meth:.upload_banner_additional_image
  • :meth:.upload_banner_hover_image
  • :meth:.delete_banner
  • :meth:.delete_banner_additional_image
  • :meth:.delete_banner_hover_image
  • :meth:~.Subreddit.submit, :meth:~.Subreddit.submit_image, and
    :meth:~.Subreddit.submit_video support parameter nsfw to mark the submission
    NSFW immediately upon posting.
  • :meth:~.Subreddit.submit, :meth:~.Subreddit.submit_image, and
    :meth:~.Subreddit.submit_video support parameter spoiler to mark the submission
    as a spoiler immediately upon posting.
  • :meth:~.Subreddit.submit_image and :meth:~.Subreddit.submit_video support
    parameter timeout. Default timeout has been raised from 2 seconds to 10 seconds.
  • Added parameter function_kwargs to :func:.stream_generator to pass additional
    kwargs to function.

Fixed

  • :meth:.Subreddit.random returns None instead of raising
    :class:.ClientException when the subreddit does not support generating random
    submissions.

Other

  • Bumped minimum prawcore version to 1.0.1.

v6.1.1

Compare Source

Added

  • :meth:.SubredditFlair.set supports parameter flair_template_id for giving a user
    redesign flair.

v6.1.0

Compare Source

Added

  • Add method :meth:.Redditor.trophies to get a list of the Redditor's trophies.
  • Add class :class:.PostFlairWidget.
  • Add attributes reply_limit and reply_sort to class :class:.Comment
  • Add class :class:.SubredditWidgetsModeration (accessible through
    :attr:.SubredditWidgets.mod) and method :meth:.add_text_area.
  • Add class :class:.WidgetModeration (accessible through the .mod attribute on any
    widget) with methods :meth:~.WidgetModeration.update and
    :meth:~.WidgetModeration.delete.
  • Add method :meth:.Reddit.put for HTTP PUT requests.
  • Add methods :meth:.add_calendar and :meth:.add_community_list.
  • Add methods :meth:.add_image_widget and :meth:.upload_image.
  • Add method :meth:.add_custom_widget.
  • Add method :meth:.add_post_flair_widget.
  • Add method :meth:.add_menu.
  • Add method :meth:.add_button_widget.
  • Add method :meth:~.SubredditWidgetsModeration.reorder to reorder a subreddit's
    widgets.
  • Add :class:.Redditors (reddit.redditors) to provide :class:.Redditor listings.
  • Add :meth:~.Subreddit.submit_image for submitting native images to Reddit.
  • Add :meth:~.Subreddit.submit_video for submitting native videos and videogifs to
    Reddit.

Changed

  • :meth:.me returns None in :attr:.read_only mode.
  • :meth:.SubredditLinkFlairTemplates.__iter__ uses the v2 flair API endpoint. This
    change will result in additional fields being returned. All fields that were
    previously returned will still be returned.
  • :meth:.SubredditRedditorFlairTemplates.__iter__ uses the v2 flair API endpoint. The
    method will still return the exact same items.
  • Methods :meth:.SubredditRedditorFlairTemplates.add,
    :meth:.SubredditLinkFlairTemplates.add,
    :meth:.SubredditRedditorFlairTemplates.update, and
    :meth:.SubredditLinkFlairTemplates.update can add and update redesign-style flairs
    with the v2 flair API endpoint. They can still update pre-redesign-style flairs with
    the older endpoint.

Fixed

  • Widgets of unknown types are parsed as :class:.Widget\ s rather than raising an
    exception.

v6.0.0

Compare Source

Added

  • Add method :meth:.revision to get a specific wiki page revision.
  • Added parameter skip_existing to :func:.stream_generator to skip existing items
    when starting a stream.
  • Add method :meth:.Front.best to get the front page "best" listing.
  • Add :attr:.Subreddit.widgets, :class:.SubredditWidgets, and widget subclasses like
    :class:.TextArea to support fetching Reddit widgets.
  • Add method :meth:.Submission.mark_visited to mark a submission as visited on the
    Reddit backend.

Fixed

  • Fix :py:class:RecursionError on :class:.SubredditEmoji's repr and str.
  • :meth:.SubredditFilters.add and :meth:.SubredditFilters.remove also accept a
    :class:.Subreddit for the subreddit parameter.
  • Remove restriction which prevents installed (non-confidential) apps from using OAuth2
    authorization code grant flow.

Removed

v5.4.0

Compare Source

Added

  • Add method :meth:~.Reddit.patch to :class:.Reddit class to support HTTP PATCH
    requests.
  • Add class :class:.Preferences to access and update Reddit preferences.
  • Add attribute :attr:.User.preferences to access an instance of
    :class:.Preferences.
  • Add method :meth:.Message.delete.
  • Add class :class:.Emoji to work with custom subreddit emoji.

Deprecated

Fixed

  • Fix bug with positive pause_after values in streams provided by
    :func:.stream_generator where the wait time was not reset after a yielded None.
  • Parse URLs with trailing slashes and no "comments" element when creating
    :class:.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.

v5.3.0

Compare Source

Added

  • :attr:.Multireddit.stream, to stream submissions and comments from a multireddit.
  • :meth:.Redditor.block

Fixed

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

v5.2.0

Compare Source

Changed

  • An attribute on :class:.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.

v5.1.0

Compare Source

Added

  • :attr:.Redditor.stream, with methods :meth:.RedditorStream.submissions and
    :meth:.RedditorStream.comments to stream a Redditor's comments or submissions
  • :class:.RedditorStream has been added to facilitate :attr:.Redditor.stream
  • :meth:.Inbox.collapse to mark messages as collapsed.
  • :meth:.Inbox.uncollapse to mark messages as uncollapsed.
  • Raise :class:.ClientException when calling :meth:.Comment.refresh when the comment
    does not appear in the resulting comment tree.
  • :meth:.Submission.crosspost to crosspost to a subreddit.

Fixed

  • Calling :meth:.Comment.refresh on a directly fetched, deeply nested
    :class:.Comment will additionally pull in as many parent comments as possible
    (currently 8) enabling significantly quicker traversal to the top-most
    :class:.Comment via successive :meth:.parent calls.
  • Calling :meth:~.Comment.refresh previously could have resulted in a
    AttributeError: "MoreComments" object has no attribute "_replies" exception. This
    situation will now result in a :class:.ClientException.
  • Properly handle BAD_CSS_NAME errors when uploading stylesheet images with invalid
    filenames. Previously an :py:class:AssertionError was raised.
  • :class:.Submission's gilded attribute properly returns the expected value from
    reddit.

v5.0.1

Compare Source

Fixed

  • Calls to :meth:.hide and :meth:.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.

v5.0.0

Compare Source

Added

  • :meth:.Comment.disable_inbox_replies, :meth:.Comment.enable_inbox_replies
    :meth:.Submission.disable_inbox_replies, and
    :meth:.Submission.enable_inbox_replies to toggle inbox replies on comments and
    submissions.

Changed

  • cloudsearch is no longer the default syntax for :meth:~.Subreddit.search.
    lucene is now the default syntax so that PRAW's default is aligned with Reddit's
    default.
  • :meth:.Reddit.info will now take either a list of fullnames or a single URL string.
  • :meth:.Subreddit.submit accepts a flair template ID and text.

Fixed

  • Fix accessing :attr:.LiveUpdate.contrib raises AttributeError.

Removed

  • Iterating directly over :class:.SubredditRelationship (e.g., subreddit.banned,
    subreddit.contributor, subreddit.moderator, etc) and :class:.SubredditFlair
    is no longer possible. Iterate instead over their callables, e.g.
    subreddit.banned() and subreddit.flair().
  • The following methods are removed: Subreddit.mod.approve,
    Subreddit.mod.distinguish, Subreddit.mod.ignore_reports,
    Subreddit.mod.remove, Subreddit.mod.undistinguish,
    Subreddit.mod.unignore_reports.
  • Support for passing a :class:.Submission to :meth:.SubredditFlair.set is removed.
  • The thing argument to :meth:.SubredditFlair.set is removed.
  • Return values from :meth:.Comment.block, :meth:.Message.block,
    :meth:.SubredditMessage.block, :meth:.SubredditFlair.delete, :meth:.friend,
    :meth:.Redditor.message, :meth:.Subreddit.message, :meth:.select, and
    :meth:.unfriend are removed as they do not provide any useful information.
  • praw.ini no longer reads in http_proxy and https_proxy settings.
  • is_link parameter of :meth:.SubredditRedditorFlairTemplates.add and
    :meth:.SubredditRedditorFlairTemplates.clear. Use
    :class:.SubredditLinkFlairTemplates instead.

Configuration

📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Apr 20, 2024

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Updating dependencies
Resolving dependencies...


The current project's Python requirement (>=3.6,<4.0) is not compatible with some of the required packages Python requirement:
  - praw requires Python ~=3.7, so it will not be satisfied for Python >=3.6,<3.7

Because locust-tests depends on praw (7.7.1) which requires Python ~=3.7, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For praw, a possible solution would be to set the `python` property to ">=3.7,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

Copy link
Contributor Author

renovate bot commented Jun 3, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Creating virtualenv locust-tests-e8dpAx4K-py3.13 in /home/ubuntu/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...


The current project's Python requirement (>=3.6,<4.0) is not compatible with some of the required packages Python requirement:
  - praw requires Python ~=3.8, so it will not be satisfied for Python >=3.6,<3.8

Because locust-tests depends on praw (7.8.0) which requires Python ~=3.8, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For praw, a possible solution would be to set the `python` property to ">=3.8,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants