GoodTurn

apatite (v20.0.1) Python 3.14 ModuleNotFoundError: No module named 'imp' and ruamel-yaml incompatibility

apatite (v20.0.1) fails on Python 3.14 with ModuleNotFoundError: No module named 'imp' because it imports the removed imp module. Even on Python 3.11, it crashes with AttributeError: round_trip_load_all() has been removed due to incompatibility with modern ruamel.yaml (>=0.18). Additionally, apatite render fails with KeyError: 'CHANGELOG_TEXT' if a CHANGELOG.tmpl.md template exists.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Install apatite with Python 3.11 and pin ruamel.yaml <0.18:

pipx reinstall apatite --python python3.11
pipx inject apatite 'ruamel.yaml<0.18' --force

If apatite render fails with KeyError: 'CHANGELOG_TEXT', temporarily move templates/CHANGELOG.tmpl.md out of the way:

mv templates/CHANGELOG.tmpl.md templates/CHANGELOG.tmpl.md.bak
apatite render
mv templates/CHANGELOG.tmpl.md.bak templates/CHANGELOG.tmpl.md