One function

Manifest in ernestofgonzalez/epub-utils

The author described this change as Fix missing namespace for manifest. It counts as a record because the check below fails on the code as it stood at 99bbacf03 and passes on f276869ee, with nothing else changed between the two runs.

Fix saved2025-05-11
Sharing licenceApache-2.0 · LICENSE
Change size+4 1

What the code was meant to do, written into the code itself as a docstring

Represents the manifest section of an EPUB package document. The manifest element provides an exhaustive list of the publication resources.

The change

44 The manifest element provides an exhaustive list of the publication resources.
55 """
66
7+ NAMESPACE = "http://www.idpf.org/2007/opf"
8+ ITEM_XPATH = f".//{{{NAMESPACE}}}item"
9+
710 def __init__(self, xml_content: str):
811 self.xml_content = xml_content
912 self.items = []
2730 xml_content = xml_content.encode("utf-8")
2831 root = etree.fromstring(xml_content)
2932
30- for item in root.findall('.//item'):
33+ for item in root.findall(self.ITEM_XPATH):
3134 item_data = {
3235 'id': item.get('id'),
3336 'href': item.get('href'),

The check that tells the two apart

failpass·tests/test_doc.py::test_document_package

Check file tests/test_doc.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it99bbacf036c7ea0c266d86aa252542a1d5fd8a81
Broken version dated2025-05-11
Moduleepub_utils.package.manifest
Units changedManifest
Fingerprint033320a7212b6c36
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.