-
Notifications
You must be signed in to change notification settings - Fork 149
Load entry points with importlib.metadata instead of deprecated pkg_resources #249
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
Conversation
…esources I'm not sure in which circumstance DistributionNotFound may have been raised here previously, why it has been desireable to suppress that, and what the current machinery would raise instead, but if in doubt I'd rather have a warning than things silently not working.
|
@amol- : Would it be possible to review this change and create a new release soon? The deprecated pkg_resources package is slated for removal on 11-30-2025 and this would cause beaker to break with newer versions of setuptools. |
beaker/cache.py
Outdated
| RuntimeWarning, 2) | ||
| except ImportError: | ||
| pass | ||
| from StringIO import StringIO # Python2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beaker currently declares official support only for Python 3, so no need to add the backward compatible code for Python2. Especially since importlib didn't even exist on py2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, this py2-compat code (which was already present, I did not add it) is rather obsolete now; I'll remove it.
It especially makes no sense now anymore, since importlib is python-3 only.
|
@wosc It seems it fails on Python 3.9: https://github.com/bbangert/beaker/actions/runs/19457492408/job/56663092977?pr=249#step:14:224 |
|
@amol- could you trigger the CI again? I amended the previous commit. |
|
Thank you! And on the bright side: the backwards compatibility angle seems to be alright now. |
No description provided.