..
    This is the feedparser-sgmllib changelog.

    It is managed and updated by scriv during development.
    Do not edit this file directly.
    Instead, run "scriv create" to create a new changelog fragment.


CHANGELOG
#########


Unreleased changes
==================

Please see the fragment files in the `changelog.d directory`_.

..  _changelog.d directory: https://github.com/python-syndication/feedparser-sgmllib/tree/main/changelog.d


..  scriv-insert-here

.. _changelog-2.1.0:

2.1.0 - 2026-08-02
==================

Fixed
-----

*   Close tags more correctly, even if the end tag has trailing text.

    For example, ``</tag bonus>`` now closes ``<tag>`` correctly.
    The trailing content is not available to parsers.

*   Fix quadratic CPU usage in ``SGMLParser.feed()``.

    This can occur when a large document with an unfinished token
    (like ``<a href="...``) is fed into the parser in very small increments.

    The new implementation doesn't significantly change peak memory usage.

Changed
-------

*   Improve the closing tag search behavior of ``SGMLParser.finish_endtag()``.

    Previously, the method always searched the entire tag stack
    to close the innermost tag, which had a higher search cost.
    The tag stack is now searched in reverse order
    and breaks on the first matching tag.

.. _changelog-2.0.1:

2.0.1 - 2026-07-30
==================

Changed
-------

*   Include documentation, tests, and supporting files in the source distribution. (:issue:`12`)

.. _changelog-2.0.0:

2.0.0 - 2026-07-30
==================

Breaking changes
----------------

*   Switch from a namespace package to a regular package. (:issue:`kurtmckee/feedparser#585`)

    The namespace package caused issues in the feedparser dev environment
    due to conflicts with editable installs of feedparser.
    It also adversely affected deployments for users
    due to separated installs between system and venv environments.

    The new package name is ``feedparser_sgmllib``.

Documentation
-------------

*   Use the ``sphinx-issues`` plugin to link to issues and PRs.

Development
-----------

*   Use scriv to manage the CHANGELOG.

.. _changelog-1.0.0:

1.0.0 - 2026-07-27
==================

Initial release
---------------

*   Import sgmllib from Python 2.7.18.
*   Update the code to work with Python 3.
*   Move ``sgmllib`` to be a namespace package: ``feedparser.sgmllib``.

Fixed
-----

*   Convert an ``AssertionError`` from ``_markupbase`` to an ``SGMLParseError``.

Changed
-------

*   Add type annotations.
*   Convert the ``SGMLParser.__init__()`` *verbose* parameter to a bool.
*   Convert the ``SGMLParser.goahead()`` *end* parameter to a bool.

*The following changes were incorporated from feedparser:*

*   Support trailing dollar signs in attribute names.
*   Support tags with namespace prefixes.
*   Support hexadecimal character references.

Documentation
-------------

*   Publish the original sgmllib documentation to Read the Docs.

Infrastructure and maintenance
------------------------------

*   Add CI.
*   Add pre-commit hooks.
*   Update the test suite.
