src/datajoint/migrate.py imports ``packaging.version.Version`` but
``packaging`` is not listed in pyproject.toml dependencies. None of the
declared deps pull it in transitively, so a fresh ``pip install datajoint``
into a clean Python 3.12+ venv (where the venv no longer ships setuptools
by default) leaves ``packaging`` uninstalled and ``import datajoint``
raises::
ModuleNotFoundError: No module named 'packaging'
This is a pre-existing bug — same failure reproduces on 2.2.2 and 2.2.3
— but only became user-visible with Python 3.12's leaner venvs.
Adds ``packaging`` to the dependencies list. No version pin since
``migrate.py`` uses only the basic ``Version`` class, which has been
stable across the package's history.
Summary
src/datajoint/migrate.py imports from packaging.version import Version, but packaging is not declared in pyproject.toml dependencies. None of the declared deps pull it in transitively, so a fresh pip install datajoint into a clean Python 3.12+ venv (where the venv no longer ships setuptools by default) leaves packaging uninstalled and import datajoint raises:
Pre-existing bug — reproduces on 2.2.2 and 2.2.3 — but became user-visible with Python 3.12's leaner venvs.
Reproducer
Fix
Adds packaging to the dependencies list in pyproject.toml. No version pin since migrate.py uses only the basic Version class, which has been stable across the package's history.
Release target
Candidate for 2.2.4 (patch fixing a real import datajoint regression in clean Python 3.12 venvs).
Test plan