Praw

Latest version: v7.8.1

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

Scan your dependencies

Page 5 of 7

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.

5.3.0

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

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

5.2.0

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

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

5.1.0

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

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

5.0.1

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

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

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.