Skip to content

Handle Podlove chapters without start times - #604

Open
terminalchai wants to merge 1 commit into
kurtmckee:mainfrom
terminalchai:fix/missing-chapter-start
Open

terminalchai wants to merge 1 commit into
kurtmckee:mainfrom
terminalchai:fix/missing-chapter-start

Conversation

@terminalchai

Copy link
Copy Markdown

A Podlove Simple Chapters element without a start attribute makes feedparser.parse() raise TypeError, including the minimized <psc:chapters<psc:chapter> input in #599 and otherwise well-formed RSS and Atom feeds.

Return None for an absent start time, matching the existing treatment of empty or invalid start strings. Chapter metadata and valid surrounding chapters are preserved.

Addresses the missing Podlove chapter start case in #599, rather than closing the entire malformed-feed report. Adds a changelog fragment and 13 test cases covering the reported input, RSS and Atom, strict and fallback parsing, and missing/empty/invalid start values.

Validation on Windows with Python 3.11:

  • Before the fix: 5 new cases failed with TypeError; 8 compatibility cases passed. After the fix: all 13 pass.
  • Full suite: 4,310 passed, 8 skipped.
  • Black, isort, flake8, mypy (33 source files), and git diff --check pass.

Prepared with AI assistance; the diff and test results were reviewed before submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant