lemon24 / reader

A Python feed reader library.
https://reader.readthedocs.io
BSD 3-Clause "New" or "Revised" License
434 stars 31 forks source link

make_reader(read_only=True) #319

Open lemon24 opened 11 months ago

lemon24 commented 11 months ago

Allow making a read-only Reader. This is useful at least during debugging, to prevent accidentally changing an old database in any way (including migrations).

This should use the lowest-level mechanism available on the storage, e.g. ?mode=ro for SQLite; alas, URI filenames are required for this:

Traceback (most recent call last):
  ...
  File ".../reader/_storage.py", line 413, in __init__
    self.factory = LocalConnectionFactory(
  File ".../reader/_sqlite_utils.py", line 453, in __init__
    raise NotImplementedError("_is_private() does not work for uri=True")
NotImplementedError: _is_private() does not work for uri=True