Skip to content

refactor: Removed deprecation by switching to importlib.metadata#1254

Closed
tabedzki wants to merge 1 commit intodatajoint:masterfrom
tabedzki:removing_pkg_resources_to_importlib
Closed

refactor: Removed deprecation by switching to importlib.metadata#1254
tabedzki wants to merge 1 commit intodatajoint:masterfrom
tabedzki:removing_pkg_resources_to_importlib

Conversation

@tabedzki
Copy link
Copy Markdown
Contributor

@tabedzki tabedzki commented Jul 31, 2025

While the larger overhaul of the plugin architecture is being considered (#1251, this is a small fix to move away from pkg_resources and use importlib.metadata.

Nothing else has changed as this is solely to remove the deprecation warning when importing datajoint.

Edit: I tested it for Python 3.9 to 3.12 by doing

for version in 3.9 3.10 3.11 3.12; do
  uv run --python $version python -c 'import datajoint as dj; print(dj.__file__); print("Datajoint import successful")'; done

@github-actions github-actions Bot added the enhancement Indicates new improvements label Jul 31, 2025
@tabedzki tabedzki changed the title chore: Removed deprecation by switching to importlib.metadata refactor: Removed deprecation by switching to importlib.metadata Jul 31, 2025
@github-actions github-actions Bot added the documentation Issues related to documentation label Jul 31, 2025
docs: Correct spelling of 'declaration' in indexes documentation
style: Consistently format import statements in plugin and test files
@tabedzki tabedzki force-pushed the removing_pkg_resources_to_importlib branch from 28cef1a to 72be655 Compare July 31, 2025 21:16
@dimitri-yatsenko
Copy link
Copy Markdown
Member

dimitri-yatsenko commented Aug 5, 2025

Thank you, @tabedzki Please merge with the latest release.

Please also take a look at #1252 and #1253

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 45 days with no activity.

@github-actions github-actions Bot added the stale Indicates issues, pull requests, or discussions are inactive label Sep 20, 2025
@dimitri-yatsenko
Copy link
Copy Markdown
Member

@tabedzki I am closing this. We are preparing DataJoint 2.0 for release in two weeks, which upgrades the plugin infrastructure.

@tabedzki
Copy link
Copy Markdown
Contributor Author

@dimitri-yatsenko Can this be introduced into the 0.14.x EOL branch? When running pytest with datajoint, the deprecation warning keeps popping up and I believe that this is more sustainable than pinning setuptools.

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

Labels

documentation Issues related to documentation enhancement Indicates new improvements stale Indicates issues, pull requests, or discussions are inactive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants