From e7ded9a80150810ea7f5e75d4268c8d8e719dcd1 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Thu, 30 Jul 2026 09:14:37 -0500 Subject: [PATCH] Merge branch 'releases' into merge-hotfix-6.0.14 --- CHANGELOG.rst | 5 +++++ feedparser/__init__.py | 2 +- feedparser/sgml.py | 2 +- pyproject.toml | 2 +- tests/conftest.py | 26 -------------------------- tox.ini | 11 +---------- 6 files changed, 9 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e9a547df..8516aa60 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,6 +20,11 @@ Please see the fragment files in the `changelog.d directory`_. .. scriv-insert-here +6.0.14 - 2026-07-30 +=================== + +* Upgrade to feedparser-sgmllib 2.0.0. (#585) + 6.0.13 - 2026-07-28 =================== diff --git a/feedparser/__init__.py b/feedparser/__init__.py index 7d811d28..943902cf 100644 --- a/feedparser/__init__.py +++ b/feedparser/__init__.py @@ -38,7 +38,7 @@ __author__ = "Kurt McKee " __license__ = "BSD 2-clause" -__version__ = "6.0.13" +__version__ = "6.0.14" # If you want feedparser to automatically resolve all relative URIs, set this # to 1. diff --git a/feedparser/sgml.py b/feedparser/sgml.py index fedd7bc0..033c8be6 100644 --- a/feedparser/sgml.py +++ b/feedparser/sgml.py @@ -27,7 +27,7 @@ import re -import feedparser.sgmllib as sgmllib +import feedparser_sgmllib as sgmllib __all__ = [ "sgmllib", diff --git a/pyproject.toml b/pyproject.toml index 71ac34e6..50478d17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Topic :: Text Processing :: Markup", ] dependencies = [ - "feedparser-sgmllib (>=1, <2)", + "feedparser-sgmllib (>=2, <3)", "requests>=2.20.0", ] diff --git a/tests/conftest.py b/tests/conftest.py index c9d54be8..2cf47a03 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,32 +4,6 @@ import responses -# TODO: tag=bad-layout -# -# The `sys.path` must be modified to guarantee that -# the repository's root directory IS NOT present -# at the start of the import path list. -# -# If the path appears at the beginning of `sys.path`, -# it will breaks imports because of the namespace package -# feedparser-sgmllib. -# -# After migrating to a `src/` layout, remove this code block. -# -# ---- 8< ---- -def rewrite_sys_path(): - import pathlib - import sys - - root = str(pathlib.Path(__file__).parent.parent.absolute()) - if sys.path[0] == root: - sys.path.pop(0) - - -rewrite_sys_path() -# ---- >8 ---- - - @pytest.fixture def use_loose_parser(monkeypatch): import feedparser.api diff --git a/tox.ini b/tox.ini index 789a0c64..341ead99 100644 --- a/tox.ini +++ b/tox.ini @@ -46,16 +46,7 @@ deps = -r requirements/test/requirements.txt chardet: chardet commands = - # TODO: tag=bad-layout - # - # `--import-mode=append` is required to prevent pytest - # from inserting the repository's root directory - # at the beginning of `sys.path`, which breaks imports - # because of the namespace package feedparser-sgmllib. - # - # After migrating to a `src/` layout, remove the option. - # - coverage run -m pytest --import-mode=append {posargs:} + coverage run -m pytest {posargs:} [testenv:coverage_base]