Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg_resources is soon to be depreciated #256

Closed
DominicOram opened this issue Aug 27, 2024 · 0 comments · Fixed by #257
Closed

pkg_resources is soon to be depreciated #256

DominicOram opened this issue Aug 27, 2024 · 0 comments · Fixed by #257

Comments

@DominicOram
Copy link

DominicOram commented Aug 27, 2024

Description

When trying to import zocalo under python version 3.11 I get a depreciation warning:

ImportError while loading conftest '/scratch/ffv81422/mx_bluesky_hyperion_merge/mx-bluesky/tests/conftest.py'.
tests/conftest.py:18: in <module>
    from dodal.beamlines import i03
../dodal/src/dodal/beamlines/i03.py:41: in <module>
    from dodal.devices.zocalo import ZocaloResults
../dodal/src/dodal/devices/zocalo/__init__.py:1: in <module>
    from dodal.devices.zocalo.zocalo_interaction import ZocaloStartInfo, ZocaloTrigger
../dodal/src/dodal/devices/zocalo/zocalo_interaction.py:7: in <module>
    import zocalo.configuration
.venv/lib/python3.11/site-packages/zocalo/configuration/__init__.py:14: in <module>
    import pkg_resources
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:105: in <module>
    warnings.warn(
E   DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

The documentation suggests moving to https://importlib-metadata.readthedocs.io/en/latest/migration.html#pkg-resources-iter-entry-points to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant