Praw

Latest version: v7.8.1

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 7

6.4.0

------------------

**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.

6.3.1

------------------

**Removed**

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

6.3.0

------------------

**Added**

- Collections (:class:`.Collection` and helper classes).
- :meth:`~.Subreddit.submit`, :meth:`~.Subreddit.submit_image`, and
:meth:`~.Subreddit.submit_video` can be used to submit a post directly to a
collection.
- ``praw.util.camel_to_snake`` and ``praw.util.snake_case_keys``.
- Comments can now be locked and unlocked via ``comment.mod.lock()`` and
``comment.mod.unlock()``. See: (:meth:`~.ThingModerationMixin.lock` and
:meth:`~.ThingModerationMixin.unlock`).
- ``align`` parameter to :meth:`.upload_banner_additional_image`

**Changed**

- :meth:`.Reddit.info` now accepts any non-str iterable for fullnames (not just
``list``).
- :meth:`.Reddit.info` now returns a generator instead of a list when using the ``url``
parameter.

6.2.0

------------------

**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.

6.1.1

------------------

**Added**

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

6.1.0

------------------

**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.

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.