See Ash Code logo See Ash Code

When an upstream dependency became part of my maintenance work

Ashlynn Antrobus
• • 3 min read

The EPUB-reading dependency in ebook2text has changed source twice since January. The code that asks it to open a book can look much the same while the installation instructions underneath it change.

On March 12, I switched the dependency declaration from a Git source to ebooklib-autoupdate.

There is a maintenance decision hiding in that line. Which code am I asking somebody else to install when they install mine?

A dragon carries a stack of paper from one workshop to another dragon making books.

Illustration: a workshop relies on supplies from another workshop.

From a local copy to a Git source

In the January 5 change, I declared ebooklib as a dependency and added a uv source entry pointing at its GitHub repository:

[tool.uv.sources]
ebooklib = { git = "https://github.com/aerkalov/ebooklib" }

That records the source for a tool that understands this configuration. It also means I need to consider what is written into the package’s dependency metadata for other installers.

Three days later, I moved the Git reference into the dependency declaration itself:

"ebooklib@git+https://github.com/aerkalov/ebooklib",

The source requirement now sits with the runtime requirements rather than in a separate uv source table. That makes the Git dependency explicit in a different place. It also gives installation a dependency on being able to obtain code from that repository.

A distribution name and an import name

The March change replaces that entry with:

"ebooklib-autoupdate>=0.18.1",

The requirements file changes too. Its previous entry names the Git repository and a specific revision. The new entry selects ebooklib-autoupdate==0.18.1.

Those two files describe different degrees of choice. The project declaration allows versions at or above its minimum; the recorded requirements select a version for that environment. I need to read both before saying what a particular installation will receive.

The changed distribution name also isn’t, by itself, a reason to rename every Python import. The package I install and the module my code imports are related names, but I shouldn’t assume they are identical. I need to check the interface the installed distribution provides.

What this changes for my package

I now have a different dependency source to track. A clean installation needs to obtain it, and the EPUB conversion tests need to exercise the API my converter uses.

The diff doesn’t tell a story about why an upstream maintainer did or didn’t make a release. I don’t need to invent one to explain my own change. I can show which source I selected and which version the requirements recorded.

This also connects to the release-workflow work. A working checkout on my computer is only one environment. The package I build has to carry dependency information that lets somebody else put together a working environment too.

AA

Written by Ashlynn Antrobus

Software developer, author, and builder. Sharing technical lessons learned from building tools like Ebook2Text, IndexedDict, and rag-mcp, and navigating life as a programmer with dyslexia.