github praw-dev/praw v8.0.0rc1

latest release: v7.8.2
pre-release2 hours ago

Added

  • Add support for Python 3.13.
  • Add support for Python 3.14.
  • Add support for optional Markdown-formatted selftext when submitting link, image,
    gallery, and video posts.
  • Add a :ref:migration guide <praw8_migration> covering all breaking changes in PRAW
    8.
  • Add :class:.Media and its subclasses :class:.EmojiMedia, :class:.PostMedia,
    :class:.StylesheetAsset, :class:.StylesheetImage, and :class:.WidgetMedia to
    consolidate media uploads. Media can be constructed from a file path, or from
    bytes content along with a name, so media no longer has to be written to disk
    before uploading.

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.me to raise :class:.ReadOnlyException when called in
    :attr:.read_only mode.

  • The subreddit attribute of :class:.Redditor is a :class:.UserSubreddit
    instance.

  • The data argument to Objector.objectify must now be passed by keyword.

  • The mark_read argument to subreddit.modmail (:class:.ModmailConversation)
    must now be passed by keyword.

  • The flair_type argument to :class:.SubredditFlairTemplates must be passed by
    keyword.

  • The selftext and url arguments to :meth:.Subreddit.submit are no longer
    mutually exclusive. When url is provided selftext will be used as optional
    body text to accompany the link submission. An exception is raised when trying to use
    inline_media with selftext for a url submission because Reddit does not
    support inline media in body text for link submissions.

  • :meth:.Subreddit.submit_video, :meth:.Subreddit.submit_gallery, and
    :meth:.Subreddit.submit_image now accept an optional Markdown-formatted selftext
    parameter.

  • The reason_id argument to :class:.RemovalReason has been renamed to id.

  • Media upload methods now accept :class:.Media instances instead of file paths:

    • The image_path argument to :meth:.SubredditEmoji.add has been replaced by
      emoji_media, which takes an :class:.EmojiMedia instance.
    • The image_path arguments to :meth:.SubredditStylesheet.upload,
      :meth:.upload_header, :meth:.upload_mobile_header, and
      :meth:.upload_mobile_icon have been replaced by image_media, which takes a
      :class:.StylesheetImage instance.
    • The image_path arguments to :meth:.SubredditStylesheet.upload_banner,
      :meth:.upload_banner_additional_image, :meth:.upload_banner_hover_image, and
      :meth:.upload_mobile_banner have been replaced by image_media, which takes a
      :class:.StylesheetAsset instance.
    • The image_media arguments to the :class:.SubredditStylesheet upload_*
      methods, other than :meth:.SubredditStylesheet.upload, must be passed
      positionally.
    • The file_path argument to :meth:.SubredditWidgetsModeration.upload_image has
      been replaced by image_media, which takes a :class:.WidgetMedia instance and
      must be passed positionally.
    • The image_path argument to :meth:.Subreddit.submit_image has been replaced by
      image_media, which takes a :class:.PostMedia instance. All arguments,
      including title, must now be passed by keyword.
    • The video_path and thumbnail_path arguments to
      :meth:.Subreddit.submit_video have been replaced by video_media and
      thumbnail_media, which take :class:.PostMedia instances. All arguments,
      including title, must now be passed by keyword.
    • The image_path key in the images dictionaries passed to
      :meth:.Subreddit.submit_gallery has been replaced by image_media, which takes
      a :class:.PostMedia instance. All arguments, including title and images,
      must now be passed by keyword.
    • The path argument to :class:.InlineMedia (:class:.InlineGif,
      :class:.InlineImage, and :class:.InlineVideo) has been replaced by media,
      which takes a :class:.PostMedia instance.
  • An unknown media type now raises :class:.ClientException when uploading media,
    instead of falling back to JPEG.

  • Media uploads to Reddit's S3 buckets now respect the configured timeout and raise
    prawcore.RequestException on transport errors, consistent with all other requests,
    instead of having no timeout and raising raw requests exceptions.

Fixed

  • Fix API endpoint for :meth:.Submission.hide and :meth:.Submission.unhide.

Removed

  • Remove Reddit.random_subreddit, Subreddit.random, and
    Subreddit.random_rising.
  • Remove APIException class.
  • Remove Comment.award and Submission.award methods.
  • Remove Comment.gild, Redditor.gild, and Submission.gild methods.
  • Remove Redditor.gilded and Subreddit.gilded methods.
  • Remove Redditor.gildings method.
  • Remove Subreddit.mod.inbox, Subreddit.mod.unread, and
    Subreddit.mod.stream.unread methods.
  • Remove Subreddits.search_by_topic method.
  • Remove Subreddits.gold method.
  • Remove :class:.Reddit keyword argument token_manager and all associated token
    managers.
  • Remove Reddit.validate_on_submit configuration attribute.
  • Remove WebSocketException.original_exception method.
  • Remove the after argument for :meth:.conversations.
  • Remove key reset_timestamp from :meth:.limits.
  • Remove SubredditMessage.mute and SubredditMessage.unmute methods.
  • Remove InboxableMixin.unblock_subreddit method.

Don't miss a new praw release

NewReleases is sending notifications on new releases.