---
title: "ebooklib 0.21 Breaking Changes on PyPI | Since.dev"
description: "What each ebooklib release removed, renamed or changed: 20 breaking changes in 3 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/ebooklib
last_updated: 2026-12-04
---

# ebooklib breaking changes

ebooklib 0.21 (November 1, 2026) is its newest release with breaking changes, 13 of them. The first: Drops Python 2.x support in EbookLib 0.21. Every breaking API change we have recorded in ebooklib on PyPI: 20 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `0.21`, released November 1, 2026. [Source repository](https://github.com/aerkalov/ebooklib)

Packages on PyPI run on Python. [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.19](#v-0-19) to [0.21](#v-0-21): 18 breaking changes in 2 versions.

## ebooklib 0.21 breaking changes

ebooklib 0.21, released November 1, 2026: 13 breaking changes.

- **Removed**  

The release removes Python 2.x support, so code running on Python 2 must move to a supported Python 3 version. [github.com](https://github.com/aerkalov/ebooklib/releases/tag/v0.21)
- **Removed** `ebooklib.epub.Directory`  

ebooklib.epub.Directory was removed in EbookLib 0.21 [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Removed** `ebooklib.epub.ebooklib`  

ebooklib.epub.ebooklib was removed in EbookLib 0.21 [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Removed** `ebooklib.epub.get_pages_for_items`  

ebooklib.epub.get_pages_for_items was removed in EbookLib 0.21 [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Removed** `ebooklib.epub.guess_type`  

ebooklib.epub.guess_type was removed in EbookLib 0.21 [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Removed** `ebooklib.epub.parse_html_string`  

ebooklib.epub.parse_html_string was removed in EbookLib 0.21 [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Removed** `ebooklib.epub.parse_string`  

ebooklib.epub.parse_string was removed in EbookLib 0.21 [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Behavior changed**  

When reading metadata, the package unique-identifier is now respected, with a legacy fallback, so the identifier returned may differ from before. [github.com](https://github.com/aerkalov/ebooklib/releases/tag/v0.21)
- **Behavior changed**  

The dcterms:modified metadata is now written as UTC time, so code that reads or compares this timestamp may see different values. [github.com](https://github.com/aerkalov/ebooklib/releases/tag/v0.21)
- **Behavior changed** `EpubWriter`  

EpubWriter now uses the mtime option as the date_time value of the zip metadata, so output timestamps can differ from before. [github.com](https://github.com/aerkalov/ebooklib/releases/tag/v0.21)
- **Signature changed** `ebooklib.epub.EpubBook.add_author`  

Was def add_author(self, author, file_as=None, role=None, uid='creator'); now def add_author(self, author: str, file_as: str | None = None, role: str | None = None, uid: str | None = None) -> None. [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Signature changed** `ebooklib.epub.EpubCoverHtml.get_content`  

Was def get_content(self); now def get_content(self, default: str | bytes | None = None) -> bytes. [pypi.org](https://pypi.org/project/EbookLib/0.21/)
- **Signature changed** `ebooklib.epub.EpubImage.__init__`  

Was def \_\_init\_\_(self, \*args, \*\*kwargs); now def \_\_init\_\_(self, uid: str | None = None, file_name: str = '', media_type: str = '', content: str | bytes | None = None, manifest: bool = True) -> None. [pypi.org](https://pypi.org/project/EbookLib/0.21/)

## ebooklib 0.20 breaking changes

ebooklib 0.20, released October 26, 2025: 5 breaking changes.

- **Removed** `ebooklib.plugins.tidyhtml.parse_html_string`  

ebooklib.plugins.tidyhtml.parse_html_string was removed in EbookLib 0.20 [pypi.org](https://pypi.org/project/EbookLib/0.20/)
- **Behavior changed** `EpubHtml.get_body_content`  

EpubHtml's get_body_content now returns bytes instead of a string. Code that expects a str from it must decode or adjust. [github.com](https://github.com/aerkalov/ebooklib/releases/tag/v0.20)
- **Signature changed** `ebooklib.epub.EpubItem.__init__`  

Was def \_\_init\_\_(self, uid=None, file_name='', media_type='', content=six.b(''), manifest=True); now def \_\_init\_\_(self, uid=None, file_name='', media_type='', content=None, manifest=True). [pypi.org](https://pypi.org/project/EbookLib/0.20/)
- **Signature changed** `ebooklib.epub.EpubItem.get_content`  

Was def get_content(self, default=six.b('')); now def get_content(self, default=None). [pypi.org](https://pypi.org/project/EbookLib/0.20/)
- **Signature changed** `ebooklib.plugins.tidyhtml.TidyPlugin.__init__`  

Was def \_\_init\_\_(self, extra={}); now def \_\_init\_\_(self, extra=None). [pypi.org](https://pypi.org/project/EbookLib/0.20/)

## ebooklib 0.19 breaking changes

ebooklib 0.19, released May 2, 2025: 2 breaking changes.

- **Behavior changed**  

Throwing errors while writing an EPUB is now optional, so existing code that relied on write errors being raised may behave differently. The note is truncated, so check the linked pull request for the exact new default. [github.com](https://github.com/aerkalov/ebooklib/releases/tag/v0.19)
- **Signature changed** `ebooklib.epub.EpubNav.__init__`  

Was def \_\_init\_\_(self, uid='nav', file_name='nav.xhtml', media_type='application/xhtml+xml', title=''); now def \_\_init\_\_(self, uid='nav', file_name='nav.xhtml', media_type='application/xhtml+xml', title='', direction=None). [pypi.org](https://pypi.org/project/EbookLib/0.19/)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
