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

(#180) Remove dependency on pkg_resources in favour of importlib #181

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Sep 13, 2024

This fixes issue #180, removing pkg_resources in favour of the standard library importlib.metadata

@ndevenish ndevenish linked an issue Sep 13, 2024 that may be closed by this pull request
@ndevenish ndevenish merged commit 28dc035 into DiamondLightSource:main Sep 13, 2024
9 checks passed
@ndevenish
Copy link
Contributor

Thanks!

@ndevenish
Copy link
Contributor

Hmm, I am currently confused why the python 3.12 github action tests did not run here (and failed) https://github.com/DiamondLightSource/python-workflows/actions/runs/10850753483/job/30112941933#step:6:218

@ndevenish
Copy link
Contributor

FWIW this is exactly why I have been reluctant to address these warnings in the past, as importlib.metadata has not had a stable interface over the full range of python versions we supported (and the dictionary address method you used here is removed now).

That the azure tests passed here made me misremember that it was python 3.8 that was maybe the problem, and manually checking, it seemed to work.

@ndevenish
Copy link
Contributor

However, that the tests did not run/pick this up is not your fault, or that I failed to remember the python 3.12 problem on review.

ndevenish added a commit that referenced this pull request Sep 13, 2024
@ndevenish
Copy link
Contributor

Unless you want to address that now, I am minded to revert (as I do not have time to fix this now)

ndevenish added a commit that referenced this pull request Sep 13, 2024
* Revert "Remove dependency on pkg_resources in favour of importlib (#181)"

This ran into the python 3.8/3.10/3.12 cross-compatibility issue.

* Add python 3.12 to azure testing

This should avoid this problem happening again (and github actions should now run properly).
@ndevenish
Copy link
Contributor

Please feel free to recreate this PR, it should be properly tested now.

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 this pull request may close these issues.

use of deprecated pkg_resources in transport/__init__.py
2 participants