maintainer-feedback requested: [Bug 300116] archivers/py-warctools: Update to 5.0.1
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 300116] archivers/py-warctools: Update to 5.0.1"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 26 Oct 2026 22:18:04 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-python (Nobody)
<python@FreeBSD.org> for maintainer-feedback:
Bug 300116: archivers/py-warctools: Update to 5.0.1
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300116
--- Description ---
hanzo.warclinks fails to import, on any Python version (3.12, the
current default, shown):
$ python3.12 -c 'import hanzo.warclinks'
ImportError: cannot import name 'HTMLParseError' from 'html.parser'
(/usr/local/lib/python3.12/html/parser.py)
html.parser dropped HTMLParseError in Python 3.5 (HTMLParser no longer
raises it). warclinks also compares the record types, URLs, headers and
bodies that warctools returns as bytes with str, so even when it imports
it logs an error per record and prints no links.
The patch defines a stand-in for HTMLParseError, compares with bytes and
decodes where needed, and updates the port to 5.0.1 (2025-08-18):
- 5.0 moved to a PEP 621 pyproject.toml with a PEP 639 license string,
which needs setuptools>=77; files/patch-pyproject.toml puts back the
license table for the tree's setuptools 63.1.0;
- the same patch keeps the hanzo.*.tests packages that the sdist now
ships out of the install: they are excluded from package discovery,
and include-package-data (on by default with pyproject.toml) is turned
off, since it would otherwise add their files back from the sdist's
SOURCES.txt (warctools has no other package data);
- LICENSE_FILE is added;
- concurrent is added to USE_PYTHON (bin/arc2warc, bin/warcdump, ...)
and the patches in files/ get a header saying what each one does and
its upstream status (Description, Issue ID, Changeset, TODO).
Impact: no ports depend on it.
Tested: poudriere bulk -C -t on 14.5-RELEASE amd64, both with Python
3.12 and with DEFAULT_VERSIONS+=python=3.13: builds, all 21 modules
import from the built package, and no test packages are installed. In an
earlier build with the same warclinks patch, warclinks printed both
links of a generated WARC file.
Upstream: 5.0.1 and master still import HTMLParseError; the fix has been
submitted upstream (https://github.com/internetarchive/warctools/pull/39). The
setuptools requirement that the PEP 639 license string needs has been
submitted as well (https://github.com/internetarchive/warctools/pull/40).