Skip to content

Remove setuptools upper pin and otumat for maint/0.14 - #1571

Merged
dimitri-yatsenko merged 1 commit into
datajoint:maint/0.14from
tabedzki:tabedzki/fix/drop-pkg-resources
Oct 5, 2026
Merged

dimitri-yatsenko merged 1 commit into
datajoint:maint/0.14from
tabedzki:tabedzki/fix/drop-pkg-resources

Conversation

@tabedzki

@tabedzki tabedzki commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Hi @dimitri-yatsenko,

This PR replaces the setuptools<82 pin from datajoint/datajoint-python#1396 with the importlib.metadata fix as suggested in datajoint/datajoint-python#1394. It also inlines otumat's two functions, so otumat and setuptools are no longer runtime dependencies, while keeping the plugin behavior unchanged.

The main motivation stems from a shared database with DataJoint-MATLAB, which can't read 2.x schemas, so we're staying on 0.14.x.

Please let me know if there are any other changes you'd like to see in the PR and I'd be happy to address them.


The full test suite passes on Python 3.9–3.13, apart from 7 failures that also happen on unmodified maint/0.14; PyMySQL 1.2's new TLS default causes them.

pkg_resources was removed in setuptools 82, and otumat (archived) imports
distutils, which Python 3.12+ only provides through setuptools. Use
importlib.metadata for plugin discovery and inline otumat's hash_pkg and
verify, so datajoint no longer depends on setuptools or otumat. The
plugin system and its signature check are unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5

@dimitri-yatsenko dimitri-yatsenko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tabedzki, this is a clean fix. I checked the copied hash_pkg/verify against otumat 0.3.1: hashes are identical across several real packages and an edge-case folder on Python 3.9–3.13, and the plugin tests pass without setuptools or otumat installed. We'll merge and cut 0.14.10 from maint/0.14.

@dimitri-yatsenko dimitri-yatsenko added the bug Indicates an unexpected problem or unintended behavior label Oct 5, 2026
@dimitri-yatsenko
dimitri-yatsenko merged commit 9f0a8ee into datajoint:maint/0.14 Oct 5, 2026
@dimitri-yatsenko

Copy link
Copy Markdown
Member

@tabedzki, merged, thanks. It will be published to PyPI as 0.14.10.

Please note that this is not an official release: DataJoint no longer supports versions before 2.0, so the full test suite was not run. We ran only the plugin tests (tests/test_plugin.py, Python 3.9–3.13). Please test it against your own setup before relying on it.

@tabedzki
tabedzki deleted the tabedzki/fix/drop-pkg-resources branch October 5, 2026 18:07
@tabedzki

tabedzki commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Noted. Thank you Dimitri!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Indicates an unexpected problem or unintended behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants