diff --git a/changelog.d/20260729_130324_kurtmckee_regular_package.rst b/changelog.d/20260729_130324_kurtmckee_regular_package.rst new file mode 100644 index 0000000..60265f7 --- /dev/null +++ b/changelog.d/20260729_130324_kurtmckee_regular_package.rst @@ -0,0 +1,4 @@ +Documentation +------------- + +* Use the ``sphinx-issues`` plugin to link to issues and PRs. diff --git a/changelog.d/20260729_131657_kurtmckee_regular_package.rst b/changelog.d/20260729_131657_kurtmckee_regular_package.rst new file mode 100644 index 0000000..e833233 --- /dev/null +++ b/changelog.d/20260729_131657_kurtmckee_regular_package.rst @@ -0,0 +1,9 @@ +Breaking changes +---------------- + +* Switch from a namespace package to a regular package. (:issue:`kurtmckee/feedparser#585`) + + The choice to use a namespace package caused development issues in feedparser, + and affected deployments for users. + + The new package name is ``feedparser_sgmllib``. diff --git a/changelog.d/fragment-template.rst.jinja2 b/changelog.d/fragment-template.rst.jinja2 index de56313..6d373ce 100644 --- a/changelog.d/fragment-template.rst.jinja2 +++ b/changelog.d/fragment-template.rst.jinja2 @@ -13,10 +13,14 @@ "Supports a new feature" or "A new feature is supported". 4. If your change is associated with an issue on GitHub, - list the issue number(s) in parentheses, separated by - commas. For example: + list the issue number(s) after the first sentence. + For example: - Support a new feature. (#10, #20) + Support a new feature. (:issue:`10, 20`) + + It's also possible to reference other repositories' issues: + + Fix a bug. (:issue:`group/repo#10`) {% for category in config.categories %} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/conf.py b/docs/conf.py index f7f8525..f264837 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,6 +22,15 @@ # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" +extensions = [ + "sphinx_issues", +] + +# `sphinx_issues` configuration +# ----------------------------- + +issues_github_path = "python-syndication/feedparser-sgmllib" + # HTML theme configuration # ------------------------ diff --git a/docs/sgmllib.rst b/docs/sgmllib.rst index 8be775e..d386412 100644 --- a/docs/sgmllib.rst +++ b/docs/sgmllib.rst @@ -1,7 +1,7 @@ -:mod:`sgmllib` --- Simple SGML parser -===================================== +API documentation +================= -.. module:: sgmllib +.. module:: feedparser_sgmllib :synopsis: Support parsing XML feeds and HTML. .. index:: single: SGML @@ -139,7 +139,7 @@ A single exception is defined as well: .. method:: SGMLParser.convert_codepoint(codepoint) Convert a code point to a :class:`str` value. Encodings can be handled here if - appropriate, though the rest of :mod:`sgmllib` is oblivious on this matter. + appropriate, though the rest of :mod:`feedparser_sgmllib` is oblivious on this matter. .. method:: SGMLParser.handle_entityref(ref) diff --git a/pyproject.toml b/pyproject.toml index e93b19e..5fb0ca3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,15 +19,6 @@ requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" -# poetry -# ------ - -[tool.poetry] -packages = [ - { include = "feedparser", from = "src" } -] - - # coverage # -------- @@ -36,7 +27,7 @@ relative_files = true parallel = true branch = true source = [ - "feedparser.sgmllib", + "feedparser_sgmllib", "tests", ] @@ -72,7 +63,7 @@ force_single_line = true # ---- [tool.mypy] -packages = "feedparser.sgmllib" +packages = "feedparser_sgmllib" strict = true sqlite_cache = true enable_error_code = [ diff --git a/requirements/docs/pyproject.toml b/requirements/docs/pyproject.toml index 9633448..c33ce90 100644 --- a/requirements/docs/pyproject.toml +++ b/requirements/docs/pyproject.toml @@ -6,4 +6,5 @@ name = "dependencies" requires-python = ">=3.10" dependencies = [ "sphinx", + "sphinx_issues", ] diff --git a/requirements/docs/requirements.txt b/requirements/docs/requirements.txt index 49376e8..f2d3ddf 100644 --- a/requirements/docs/requirements.txt +++ b/requirements/docs/requirements.txt @@ -1,6 +1,6 @@ alabaster==1.0.0 ; python_version >= "3.10" babel==2.18.0 ; python_version >= "3.10" -certifi==2026.6.17 ; python_version >= "3.10" +certifi==2026.7.22 ; python_version >= "3.10" charset-normalizer==3.4.9 ; python_version >= "3.10" colorama==0.4.6 ; python_version >= "3.10" and sys_platform == "win32" docutils==0.21.2 ; python_version >= "3.10" @@ -12,6 +12,7 @@ packaging==26.2 ; python_version >= "3.10" pygments==2.20.0 ; python_version >= "3.10" requests==2.34.2 ; python_version >= "3.10" snowballstemmer==3.1.1 ; python_version >= "3.10" +sphinx-issues==6.0.0 ; python_version >= "3.10" sphinx==8.1.3 ; python_version >= "3.10" sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.10" sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.10" diff --git a/src/feedparser/sgmllib/__init__.py b/src/feedparser_sgmllib/__init__.py similarity index 100% rename from src/feedparser/sgmllib/__init__.py rename to src/feedparser_sgmllib/__init__.py diff --git a/src/feedparser/sgmllib/py.typed b/src/feedparser_sgmllib/py.typed similarity index 100% rename from src/feedparser/sgmllib/py.typed rename to src/feedparser_sgmllib/py.typed diff --git a/tests/conftest.py b/tests/conftest.py index 97dea4b..d4dd00d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import pytest -import feedparser.sgmllib as sgmllib +import feedparser_sgmllib as sgmllib @pytest.fixture diff --git a/tests/test_sgmllib.py b/tests/test_sgmllib.py index 14c5a1a..0387e8a 100644 --- a/tests/test_sgmllib.py +++ b/tests/test_sgmllib.py @@ -3,7 +3,7 @@ import pytest -import feedparser.sgmllib as sgmllib +import feedparser_sgmllib as sgmllib def test_doctype_decl_internal(event_collector):