Skip to content

Commit

Permalink
Make ReaderWarning inherit from ReaderError.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon24 committed Aug 4, 2023
1 parent 0087b8d commit 53f29a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Unreleased
when :ref:`updating feeds <update>` in parallel;
:mod:`multiprocessing.dummy` does not work on some environments
(e.g. AWS Lambda).
* Make :exc:`ReaderWarning` inherit from :exc:`ReaderError`.
* Include a diagram of the :ref:`exctree` in the :doc:`api`.


Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Exceptions

.. autoexception:: ReaderWarning

Subclass of :exc:`UserWarning`.
Subclass of :exc:`ReaderError` and :exc:`UserWarning`.


.. _exctree:
Expand Down
7 changes: 5 additions & 2 deletions src/reader/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ class ReaderError(_FancyExceptionBase):
"""Base for all public exceptions."""


class ReaderWarning(UserWarning):
"""Base for all warnings emitted by *reader*.
class ReaderWarning(ReaderError, UserWarning):
"""Base for all warnings emitted by *reader*
that are not :exc:`DeprecationWarning`.
.. versionadded:: 2.13
.. versionchanged:: 3.8
Inherit from :exc:`ReaderError`.
"""


Expand Down

0 comments on commit 53f29a4

Please sign in to comment.