Repository navigation
Require comicfn2dict 1.0 and comicbox-pdffile 1.0 - #227
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PageFormatis now aStrEnum, but the.valuestrings that comicbox uses for its--pdf-pageschoices are the same.The bump fixes two bugs that affected users:
+HH'mm'timezone form. Dates without a timezone, with a bareZ, with a-0800offset, or with just a year failed to parse. comicbox's fallback parser can't read theD:prefix either, soModDatewas dropped with two warnings andupdated_atcame back empty. 1.0.0 reads all of these and treats a missing timezone as UTC. UTC matters here:PdfDateTimeFieldreturns pdffile's datetime directly and never reachesDateTimeField._ensure_aware, so without it a naive datetime would get through.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-endModDate→updated_atread. 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: cleancomicbox-pdffile==0.6.3, which shows it catches the old behavior🤖 Generated with Claude Code