Skip to content

fix: import migrate from dandischema.metadata - #2886

Merged
jjnesbitt merged 1 commit into
dandi:masterfrom
candleindark:fix-migrate-published-version-metadata-import
Aug 13, 2026
Merged

fix: import migrate from dandischema.metadata#2886
jjnesbitt merged 1 commit into
dandi:masterfrom
candleindark:fix-migrate-published-version-metadata-import

Conversation

@candleindark

Copy link
Copy Markdown
Member

./manage.py migrate_published_version_metadata fails at import time with ImportError and cannot run at all.

dandischema 0.12.0 (dandi-schema#294) stopped re-exporting migrate at the package root, but this command still does from dandischema import migrate. The sibling migrate_version_metadata command already uses the correct from dandischema.metadata import migrate.

Nothing in the test suite imports this module, which is why it went unnoticed.

Test plan

  • Confirmed the ImportError on master under the current dandischema==0.12.1 pin, and that the module imports cleanly after the change.
  • ruff check and ruff format --check pass.

`dandischema` 0.12.0 stopped re-exporting `migrate` at the package root, so
`from dandischema import migrate` has raised `ImportError` ever since. That
makes `./manage.py migrate_published_version_metadata` fail immediately on
startup, so the command cannot run at all. Nothing in the test suite imports
this module, which is why the breakage went unnoticed.

The sibling `migrate_version_metadata` command already uses the correct import
path.

Co-Authored-By: Claude Code 2.1.228 / Claude Opus 5 claude-opus-5 <noreply@anthropic.com>
@candleindark candleindark added the bug Something isn't working label Aug 12, 2026
@jjnesbitt jjnesbitt added the patch Increment the patch version when merged label Aug 13, 2026
@jjnesbitt
jjnesbitt merged commit 3b55cf2 into dandi:master Aug 13, 2026
7 checks passed
@dandibot

Copy link
Copy Markdown
Member

🚀 PR was released in v1.0.1 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working patch Increment the patch version when merged released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants