Skip to content

Require comicfn2dict 1.0 and comicbox-pdffile 1.0 - #227

Merged
ajslater merged 1 commit into
developfrom
deps/comicfn2dict-pdffile-1.0
Oct 1, 2026
Merged

ajslater merged 1 commit into
developfrom
deps/comicfn2dict-pdffile-1.0

Conversation

@ajslater

@ajslater ajslater commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Summary

comicbox now requires comicfn2dict 1.0 and comicbox-pdffile 1.0 for v5.3.0. No comicbox code had to change. comicfn2dict's API is unchanged. pdffile's PageFormat is now a StrEnum, but the .value strings that comicbox uses for its --pdf-pages choices are the same.

The bump fixes two bugs that affected users:

  • PDF dates. Under pdffile 0.6.3, a PDF date was only read if it ended in the full +HH'mm' timezone form. Dates without a timezone, with a bare Z, with a -0800 offset, or with just a year failed to parse. comicbox's fallback parser can't read the D: prefix either, so ModDate was dropped with two warnings and updated_at came back empty. 1.0.0 reads all of these and treats a missing timezone as UTC. UTC matters here: PdfDateTimeField returns pdffile's datetime directly and never reaches DateTimeField._ensure_aware, so without it a naive datetime would get through.
  • Filename parsing. Long digit runs in a filename no longer make parsing hang. An 80-digit filename took 0.75s to parse with comicfn2dict 0.3.2 and 0.007s with 1.0.0, with the same output. comicfn2dict has its own test for this, so there's no timing test here.

The bump also loosens confuse to ~=2.3.

Changes

  • pyproject.toml / uv.lock: new dependency specs.
  • tests/unit/test_pdf_date_field.py: covers the field and an end-to-end ModDate → updated_at read. 5 of its 6 cases fail under 0.6.3.
  • NEWS.md: two fixes and a Dependencies entry under v5.3.0.

Test plan

  • make test: 2265 passed, 1 skipped (the earlier 2259 plus the 6 new cases)
  • make lint, make ty, make fix: clean
  • The new test fails against comicbox-pdffile==0.6.3, which shows it catches the old behavior

🤖 Generated with Claude Code

Both releases are the Python 3.11 floor that comicbox 5.3.0 adopts. No
comicbox code depended on what changed: comicfn2dict's API is untouched,
and pdffile's PageFormat becoming a StrEnum leaves the `.value` strings
comicbox builds its --pdf-pages choices from the same.

Two fixes reach users through the bump:

- pdffile 0.6.3's date regex required the `'mm'` timezone suffix, so a
  PDF date without a timezone, with a bare `Z`, a `-0800` offset, or just
  a year failed to parse. comicbox's fallback parser can't read the `D:`
  prefix either, so ModDate was dropped with two warnings and updated_at
  came back empty. 1.0.0 parses every form and returns UTC for tz-less
  dates. That second half matters: PdfDateTimeField returns pdffile's
  datetime directly and never reaches DateTimeField._ensure_aware, so a
  naive datetime would otherwise leak. The new test pins both halves; 5
  of its 6 cases fail under 0.6.3.

- comicfn2dict's issue regex backtracked polynomially on long digit
  runs. An 80-digit filename took 0.75s to parse through comicbox's
  filename schema under 0.3.2 and 0.007s under 1.0.0, same output.
  comicfn2dict tests this itself, so there is no timing test here.

Also loosens confuse to ~=2.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ajslater
ajslater merged commit d43e4b3 into develop Oct 1, 2026
7 checks passed
@ajslater
ajslater deleted the deps/comicfn2dict-pdffile-1.0 branch October 6, 2026 20:43
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