Reader

Latest version: v3.17

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

Scan your dependencies

Page 4 of 14

3.0

-----------

Released 2022-07-30

.. attention::

This release contains backwards incompatible changes.


* Remove old database migrations.

Remove :mod:`~reader.plugins.mark_as_read` config tag name migration.

If you are upgrading from *reader* 2.10 or newer, no action is required.

.. _removed migrations 3.0:

.. attention::

If you are upgrading to *reader* 3.0 from a version **older than 2.10**,
you must open your database with *reader* 2.10 or newer once,
to run the removed migrations:

.. code-block:: sh

pip install 'reader>=2.10,<3' && \
python - db.sqlite << EOF
import sys
from reader import make_reader
from reader.plugins.mark_as_read import _migrate_pre_2_7_metadata as migrate_mark_as_read

reader = make_reader(sys.argv[1])

for feed in reader.get_feeds():
migrate_mark_as_read(reader, feed)

print("OK")

EOF

* Remove code that issued deprecation warnings in versions 2.* (:issue:`268`):

* :meth:`Reader.get_feed_metadata`
* :meth:`Reader.get_feed_metadata_item`
* :meth:`Reader.set_feed_metadata_item`
* :meth:`Reader.delete_feed_metadata_item`
* :meth:`Reader.get_feed_tags`
* :meth:`Reader.add_feed_tag`
* :meth:`Reader.remove_feed_tag`
* :exc:`MetadataError`
* :exc:`MetadataNotFoundError`
* :exc:`FeedMetadataNotFoundError`
* :exc:`EntryMetadataNotFoundError`
* the :attr:`~Entry.object_id` property of data objects and related exceptions

* Make some of the parameters of the following positional-only (:issue:`268`):

* :meth:`Reader.add_feed`: ``feed``
* :meth:`Reader.delete_feed`: ``feed``
* :meth:`Reader.change_feed_url`: ``old``, ``new``
* :meth:`Reader.get_feed`: ``feed``, ``default``
* :meth:`Reader.set_feed_user_title`: ``feed``, ``title``
* :meth:`Reader.enable_feed_updates`: ``feed``
* :meth:`Reader.disable_feed_updates`: ``feed``
* :meth:`Reader.update_feed`: ``feed``
* :meth:`Reader.get_entry`: ``entry``, ``default``
* :meth:`Reader.set_entry_read`: ``entry``, ``read``
* :meth:`Reader.mark_entry_as_read`: ``entry``
* :meth:`Reader.mark_entry_as_unread`: ``entry``
* :meth:`Reader.set_entry_important`: ``entry``, ``important``
* :meth:`Reader.mark_entry_as_important`: ``entry``
* :meth:`Reader.mark_entry_as_unimportant`: ``entry``
* :meth:`Reader.add_entry`: ``entry``
* :meth:`Reader.delete_entry`: ``entry``
* :meth:`Reader.search_entries`: ``query``
* :meth:`Reader.search_entry_counts`: ``query``
* :meth:`Reader.get_tags`: ``resource``
* :meth:`Reader.get_tag_keys`: ``resource``
* :meth:`Reader.get_tag`: ``resource``, ``key``, ``default``
* :meth:`Reader.set_tag`: ``resource``, ``key``, ``value``
* :meth:`Reader.delete_tag`: ``resource``, ``key``
* :meth:`Reader.make_reader_reserved_name`: ``key``
* :meth:`Reader.make_plugin_reserved_name`: ``plugin_name``, ``key``
* :exc:`FeedError` (and subclasses): ``url``
* :exc:`EntryError` (and subclasses): ``feed_url``, ``entry_id``
* :exc:`TagError` (and subclasses): ``resource_id``, ``key``

* In :func:`make_reader`,
wrap exceptions raised during plugin initialization
in new exception :exc:`PluginInitError`
instead of letting them bubble up.
(:issue:`268`)

* Swap the order of the first two arguments of :exc:`TagError` (and subclasses);
``TagError(key, resource_id, ...)`` becomes
``TagError(resource_id, key, ...)``.
(:issue:`268`)

2.17

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

Released 2022-07-23

* Deprecate the :attr:`~Entry.object_id` property of data objects
in favor of new property :attr:`~Entry.resource_id`.
:attr:`~Entry.resource_id` is the same as :attr:`~Entry.object_id`,
except for feeds and feed-related exceptions it is
of type ``tuple[str]`` instead of ``str``.
:attr:`~Entry.object_id` **will be removed in version 3.0**.
(:issue:`266`, :issue:`268`)
* Do not attempt too hard to run ``PRAGMA optimize`` if the database is busy.
Prevents rare "database is locked" errors when multiple threads
using the same reader terminate at the same time.
(:issue:`206`)

2.16

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

Released 2022-07-17

* Allow using a :class:`Reader` object from multiple threads directly
(do not require it to be used as a context manager anymore).
(:issue:`206`)
* Allow :class:`Reader` objects to be reused after closing.
(:issue:`206`, :issue:`284`)
* Allow calling :meth:`~Reader.close` from any thread. (:issue:`206`)
* Allow using a :class:`Reader` object from multiple asyncio tasks.
(:issue:`206`)

2.15

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

Released 2022-07-08

* Allow using :class:`Reader` objects from threads other than the creating thread.
(:issue:`206`)
* Allow using :class:`Reader` objects as context managers.
(:issue:`206`)

2.14

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

Released 2022-06-30

* Mark *reader* as providing type information.
Previously, code importing from :mod:`reader` would fail type checking with
``error: Skipping analyzing "reader": module is installed,
but missing library stubs or py.typed marker``.
(:issue:`280`)
* Drop Python 3.7 support. (:issue:`278`)
* Support PyPy 3.9.

2.13

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

Released 2022-06-28

* Add the :ref:`twitter` experimental plugin,
which allows using a Twitter account as a feed.
(:issue:`271`)
* Skip with a warning entries that have no <guid> or <link> in an RSS feed;
only raise :exc:`ParseError` if *all* entries have a missing id.
(Note that both Atom and JSON Feed entries are required to have an id
by their respective specifications.)
Thanks to `Mirek Długosz`_ for the issue and pull request.
(:issue:`281`)
* Add :exc:`ReaderWarning`.

Page 4 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.