diff --git a/CHANGES.rst b/CHANGES.rst index 5ff3e891..486eb6ad 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -21,7 +21,7 @@ Unreleased :attr:`~.RetrievedFeed.caching_info`). * The ``HTTPAcceptParserType`` was renamed to :class:`.AcceptParserType`. -* Allow :ref:`using the system-installed feedparser ` +* Allow :ref:`using the installed feedparser ` instead of the one vendored by *reader*. This is useful for working around issues in the vendored feedparser, like the libxml2 <=2.13.3 incompatibility reported in :issue:`350`; diff --git a/docs/install.rst b/docs/install.rst index 49bcec3c..fc14f2b1 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -27,7 +27,7 @@ These packages will be installed automatically when installing *reader*: (at least SQLite 3.18 with the `JSON1`_ and `FTS5`_ extensions). -.. _use-system-feedparser: +.. _no-vendored-feedparser: .. note:: @@ -35,8 +35,8 @@ These packages will be installed automatically when installing *reader*: *reader* uses a vendored version of feedparser's `develop`_ branch by default since :ref:`version 2.9`. To opt out of this behavior, and make *reader* use - the system-installed ``feedparser`` package, - set the ``READER_USE_SYSTEM_FEEDPARSER`` environment variable to ``1``. + the installed ``feedparser`` package, + set the ``READER_NO_VENDORED_FEEDPARSER`` environment variable to ``1``. .. _develop: https://github.com/kurtmckee/feedparser diff --git a/src/reader/_parser/feedparser.py b/src/reader/_parser/feedparser.py index 7ea5f383..1e5fb34f 100644 --- a/src/reader/_parser/feedparser.py +++ b/src/reader/_parser/feedparser.py @@ -20,7 +20,7 @@ from ._http_utils import unparse_accept_header -if os.environ.get('READER_USE_SYSTEM_FEEDPARSER', '') not in ('', '0'): +if os.environ.get('READER_NO_VENDORED_FEEDPARSER', '') not in ('', '0'): import feedparser # type: ignore else: from .._vendor import feedparser diff --git a/tests/test_parser.py b/tests/test_parser.py index 072807bc..c0d30036 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1172,7 +1172,7 @@ def test_reader_use_system_feedparser(monkeypatch, reload_module): import reader._parser.feedparser import reader._vendor.feedparser - name = 'READER_USE_SYSTEM_FEEDPARSER' + name = 'READER_NO_VENDORED_FEEDPARSER' monkeypatch.delenv(name, raising=False) reload_module(reader._parser.feedparser)