Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.d/20260729_130324_kurtmckee_regular_package.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Documentation
-------------

* Use the ``sphinx-issues`` plugin to link to issues and PRs.
9 changes: 9 additions & 0 deletions changelog.d/20260729_131657_kurtmckee_regular_package.rst
Original file line number Diff line number Diff line change
@@ -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``.
10 changes: 7 additions & 3 deletions changelog.d/fragment-template.rst.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ------------------------
Expand Down
8 changes: 4 additions & 4 deletions docs/sgmllib.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
13 changes: 2 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
# --------

Expand All @@ -36,7 +27,7 @@ relative_files = true
parallel = true
branch = true
source = [
"feedparser.sgmllib",
"feedparser_sgmllib",
"tests",
]

Expand Down Expand Up @@ -72,7 +63,7 @@ force_single_line = true
# ----

[tool.mypy]
packages = "feedparser.sgmllib"
packages = "feedparser_sgmllib"
strict = true
sqlite_cache = true
enable_error_code = [
Expand Down
1 change: 1 addition & 0 deletions requirements/docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ name = "dependencies"
requires-python = ">=3.10"
dependencies = [
"sphinx",
"sphinx_issues",
]
3 changes: 2 additions & 1 deletion requirements/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

import feedparser.sgmllib as sgmllib
import feedparser_sgmllib as sgmllib


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sgmllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

import feedparser.sgmllib as sgmllib
import feedparser_sgmllib as sgmllib


def test_doctype_decl_internal(event_collector):
Expand Down