Skip to content

Upgrade yoyo-migrations to 9.0.0 to fix pkg_resources crash#1215

Merged
audiodude merged 1 commit into
mainfrom
yoyo-9-pkg-resources
Jul 17, 2026
Merged

Upgrade yoyo-migrations to 9.0.0 to fix pkg_resources crash#1215
audiodude merged 1 commit into
mainfrom
yoyo-9-pkg-resources

Conversation

@audiodude

Copy link
Copy Markdown
Member

Problem

Running migrations in the production workers container fails immediately:

File "/usr/local/lib/python3.14/site-packages/yoyo/migrations.py", line 37, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

yoyo-migrations==8.0.0 imports pkg_resources, which comes from setuptools. Two things make that import impossible now:

  • The python:3.14 base image no longer includes setuptools (Python 3.12+ stopped bundling it).
  • Even installing setuptools doesn't help anymore: setuptools >= 81 removed pkg_resources entirely (current release is 83.0.0).

Fix

Bump to yoyo-migrations==9.0.0, which dropped the pkg_resources dependency. Verified in a clean Python 3.14 environment that 9.0.0 imports and runs with no setuptools present, while 8.0.0–8.2.0 all fail. The project only uses yoyo via the CLI (yoyo apply) and from yoyo import step in db/migrations/, both unchanged in 9.0.0.

The Pipfile.lock diff is a targeted upgrade (pipenv upgrade yoyo-migrations==9.0.0) — no other packages changed; the whitespace churn is the pre-commit prettier hook re-normalizing pipenv's output.

🤖 Generated with Claude Code

yoyo 8.0.0 imports pkg_resources, which is no longer available: the
python:3.14 base image ships no setuptools, and setuptools >= 81 has
removed pkg_resources entirely. This made every yoyo command crash in
the workers container with ModuleNotFoundError. yoyo 9.0.0 dropped the
pkg_resources dependency; the CLI and the `step` API used by our
migration files are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@audiodude
audiodude enabled auto-merge July 17, 2026 13:29
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.64%. Comparing base (61fcb3a) to head (f383b88).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1215   +/-   ##
=======================================
  Coverage   92.64%   92.64%           
=======================================
  Files          78       78           
  Lines        4987     4987           
=======================================
  Hits         4620     4620           
  Misses        367      367           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@audiodude
audiodude added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit 9c11d6b Jul 17, 2026
7 checks passed
@audiodude
audiodude deleted the yoyo-9-pkg-resources branch July 17, 2026 13:37
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