Praw

Latest version: v7.7.1

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

Scan your dependencies

Page 4 of 7

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.

6.0.0

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

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

- ``Subreddit.submissions`` as the API endpoint backing the method is no more. See
https://www.reddit.com/r/changelog/comments/7tus5f/update_to_search_api/.

5.4.0

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

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

- ``Subreddit.submissions`` as the API endpoint backing the method is going away. See
https://www.reddit.com/r/changelog/comments/7tus5f/update_to_search_api/.

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

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.