Skip to content

Bump ebooklib from 0.20 to 0.21 - #894

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/ebooklib-0.21
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/uv/ebooklib-0.21

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 1, 2026

Copy link
Copy Markdown
Contributor

Bumps ebooklib from 0.20 to 0.21.

Release notes

Sourced from ebooklib's releases.

v0.21

What's Changed

New Contributors

Full Changelog: aerkalov/ebooklib@v0.20...v0.21

Changelog

Sourced from ebooklib's changelog.

Version 0.21 (2026-11-01)

This is a major modernization release. It is the first release without Python 2 support and the first one with type annotations. Please read the upgrade notes before updating.

Upgrade notes

* Python 3.10 or newer is required (0.20 was the last release supporting Python 2.7 and older Python 3 versions);
  lxml is now the only runtime dependency (six was removed)
* write_epub() now raises exceptions by default; the option raise_exceptions defaults to True.
  Pass {"raise_exceptions": False} to keep the old behaviour of returning False
* An NCX file without navigation points is now read as book.toc == [] instead of a single blank Link
* book.uid and the written unique-identifier now follow the package unique-identifier attribute when a book
  has several dc:identifier entries
* add_author() without an explicit uid now gives the second and later authors the ids creator_1, creator_2, ...
  (the first one is still "creator"), so duplicate ids are no longer written
* dcterms:modified is now the UTC time (it used the local time with a Z suffix before)
* All imports from ebooklib.epub keep working; the code moved to smaller modules but everything is re-exported

Added

* Python 3.15 is tested in CI and listed in the package classifiers
* EpubWriter uses the mtime option as the timestamp of the files in the ZIP archive too, so writing the same book
  with the same mtime gives identical files (reproducible builds) ([#340](https://github.com/aerkalov/ebooklib/issues/340))
* Tutorial: reading navigation (how the EPUB 3 nav is selected), reading order of a loaded book, item IDs,
  and corrected documentation of the reader and writer options
* Add type annotations to the whole library (PEP 561 py.typed marker included), checked with ty in CI
* Add pyproject.toml (PEP 621) as the single source of packaging metadata; setup.py is now a compatibility shim
* Add typecheck job (ty) to the GitHub Actions workflow
* EpubBook.version attribute is now always defined (None for new books, set to the OPF version when reading)

Changed

  • write_epub by default throws exception. Check option raise_exceptions for more details
  • Drop support for Python 2.7 and Python < 3.10; minimal supported version is now Python 3.10
  • Remove the six dependency; lxml is the only runtime dependency now
  • Split the monolithic ebooklib/epub.py into smaller modules (consts, exceptions, toc, items, book, reader, writer); ebooklib.epub re-exports everything, so all existing imports keep working
  • Modernize code to Python 3.10+ idioms: PEP 604 unions (X | Y) in annotations and isinstance(), typing.TypeAlias, structural pattern matching (match/case) in the manifest loader and SyntaxPlugin
  • EpubItem content is now typed as accepting both str and bytes, matching long-standing documented usage
  • EpubReader raises EpubException with a clear message when the OPF is missing metadata, manifest or spine elements, or when the NCX file cannot be found (previously crashed with TypeError/AttributeError)
  • EpubHtml.get_content() / EpubCoverHtml.get_content() raise a descriptive ValueError when the item is not attached to a book (previously crashed with AttributeError)

Fixed

* Generate unique ids for several authors: add_author() used the id &quot;creator&quot; for every author, which wrote duplicate
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>

<ul>
<li><a href="https://github.com/aerkalov/ebooklib/commit/98eda5692bc6bc1f290c89da01f556b9ea134435&quot;&gt;&lt;code&gt;98eda56&lt;/code&gt;&lt;/a> Merge pull request <a href="https://redirect.github.com/aerkalov/ebooklib/issues/392&quot;&gt;#392&lt;/a> from aerkalov/ci-python-3.15</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/1334b4421b22ac9689683646613ed0617572f4d6&quot;&gt;&lt;code&gt;1334b44&lt;/code&gt;&lt;/a> ci: test against Python 3.15</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/08f010a44be7231699b2f53ed43f77c1f7c8b9dc&quot;&gt;&lt;code&gt;08f010a&lt;/code&gt;&lt;/a> Merge pull request <a href="https://redirect.github.com/aerkalov/ebooklib/issues/391&quot;&gt;#391&lt;/a> from aerkalov/release-0.21</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/b2d776578ee91a0f1d01699101e08defac60a223&quot;&gt;&lt;code&gt;b2d7765&lt;/code&gt;&lt;/a> release: prepare version 0.21</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/3db91937ad2ffb255fc35effb91eac913083e0ea&quot;&gt;&lt;code&gt;3db9193&lt;/code&gt;&lt;/a> Merge pull request <a href="https://redirect.github.com/aerkalov/ebooklib/issues/390&quot;&gt;#390&lt;/a> from aerkalov/fix-package-identifier-378</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/60d07887264991ec7cfa8571e11b90d0999ae014&quot;&gt;&lt;code&gt;60d0788&lt;/code&gt;&lt;/a> fix: respect package unique-identifier when reading metadata, keep legacy fal...</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/e13a187b28b0a7fcb87e9a8f48de15515de76ccc&quot;&gt;&lt;code&gt;e13a187&lt;/code&gt;&lt;/a> Merge remote-tracking branch 'origin/master' into fix-package-identifier-378</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/f670b220d91947494dff4bf4dd32df64747b064d&quot;&gt;&lt;code&gt;f670b22&lt;/code&gt;&lt;/a> Merge pull request <a href="https://redirect.github.com/aerkalov/ebooklib/issues/389&quot;&gt;#389&lt;/a> from aerkalov/fix-empty-ncx-toc-382</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/91e160d1011e0a20e5c0bb385d0b020d658450d1&quot;&gt;&lt;code&gt;91e160d&lt;/code&gt;&lt;/a> fix: tolerate NCX without navMap or navLabel text; document book.toc after re...</li>
<li><a href="https://github.com/aerkalov/ebooklib/commit/2418fc6260db6f6a1b41fb15ce02da45a935b142&quot;&gt;&lt;code&gt;2418fc6&lt;/code&gt;&lt;/a> Merge origin/master</li>
<li>Additional commits viewable in <a href="https://github.com/aerkalov/ebooklib/compare/v0.20...v0.21&quot;&gt;compare view</a></li>
</ul>
</details>

<br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ebooklib](https://github.com/aerkalov/ebooklib) from 0.20 to 0.21.
- [Release notes](https://github.com/aerkalov/ebooklib/releases)
- [Changelog](https://github.com/aerkalov/ebooklib/blob/master/CHANGES.txt)
- [Commits](aerkalov/ebooklib@v0.20...v0.21)

---
updated-dependencies:
- dependency-name: ebooklib
  dependency-version: '0.21'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested review from a team and leq-bot December 1, 2026 00:12
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Dec 1, 2026

rtibblesbot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Waiting for changes

Outcome: reviewed 325478f

Last updated: 2026-12-01 05:40 UTC

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #894: ebooklib 0.20 → 0.21 is safe to merge with no code changes.

  • Semver risk: minor (0.x).
  • Dependency type: production, used only by ricecooker/utils/images.py. All three APIs it calls still exist at 0.21.
  • Breaking changes: none that affect ricecooker.
    • Drops Python 2 support and the six dependency. The lockfile already requires Python >=3.10.
    • epub.py is split into modules. Everything stays importable from ebooklib.epub, with no deprecation warnings.
  • Security: fixes a path traversal in Directory.read(). Ricecooker doesn't call it.
  • Other changes: reader fixes for nav/NCX/cover parsing. A malformed NCX now reads as an empty TOC instead of failing.
  • Peer dependencies: six removed, nothing added. The uv lock revision goes from 3 to 5, which CI's uv reads fine.
  • CI: Linux and Windows pass. All five macOS jobs fail test_real_pandoc_failure_is_one_path_free_line (tests/pipeline/test_convert.py:1442).
    • main at 654b826 and #895 fail it too.
    • The cause is newer pandoc on macOS wording its YAML errors differently, unrelated to ebooklib.

Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #894: safe to merge; no prior findings.

  • Package: ebooklib 0.20 → 0.21 — minor (pre-1.0), production dependency.
  • Breaking: drops Python 2 support. No effect on Python ≥3.10.
  • Lock: the only other change removes six.
  • Security: fixes path traversal in Directory.read() via a crafted epub manifest (aerkalov/ebooklib#368).
  • Other changes: reader fixes (NCX/nav selection, empty metadata namespaces, unique IDs). No peer-dependency changes.
  • Usage: the calls in ricecooker/utils/images.py are unchanged.
  • CI: macOS jobs fail test_real_pandoc_failure_is_one_path_free_line. It fails the same way on main at 654b8266. Ubuntu and Windows jobs pass.
Prior-finding status

No prior findings.


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #894: safe to merge. The diff is unchanged since the last approval.

  • Package: ebooklib 0.20 → 0.21 (production, minor)
  • Changes: Python 2 support dropped, type hints, EPUB read/write fixes.
  • Security: fixes path traversal in Directory.read() via a crafted manifest (aerkalov/ebooklib#368).
  • Breaking changes: none affecting ricecooker. It only uses epub.read_epub and get_items_of_type (ricecooker/utils/images.py:94,108).
  • Lockfile: only the ebooklib entry changes.
  • CI: macOS jobs fail only on test_real_pandoc_failure_is_one_path_free_line. The same failure occurs on main (run 44376381954), so it is unrelated to this bump.
Prior-finding status

No prior findings.


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #894: ebooklib 0.20 → 0.21 is safe to merge with no code changes. ricecooker uses it for EPUB thumbnails in ricecooker/utils/images.py.

  • Breaking: drops Python 2 support and the six dependency. The lockfile drops six too. This doesn't affect ricecooker.
  • Security: fixes path traversal in Directory.read() (#368). ricecooker reads zip EPUBs, so it never reaches that code.
  • Behaviour: get_metadata now returns [] when a namespace is missing. The existing empty-list check handles this.
  • Used APIs: every ebooklib API ricecooker calls is unchanged.
  • Peer deps: no changes.
  • CI: macOS fails in test_real_pandoc_failure_is_one_path_free_line. A newer pandoc words the error differently. main fails the same way. Ubuntu and Windows pass.
Prior-finding status

No prior findings.


Written by rtibblesbot, an LLM-based coding agent.

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

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant