CamDavidsonPilon/lifelines

Deprecation of pkg_resources in Python 3.11

shaunporwal opened this issue · 1 comments

Hello lifelines maintainers,

Firstly, thank you for your work on this invaluable library. I rely on lifelines for survival calculations and it has been instrumental in a package I created.

I've recently encountered an issue when running tests on Python 3.11. It appears that the pkg_resources module, which lifelines depends upon, has been deprecated in favor of importlib.resources.

Here's the relevant warning:

DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

Considering the deprecation, do you have plans to transition from pkg_resources to the recommended importlib.resources? This would ensure that lifelines remains compatible with future versions of Python and does not produce deprecation warnings.

Thank you for your time and consideration. I look forward to any updates on this matter.

Best,
Shaun

Hi @shaunporwal, thanks for opening this issue.

Yea, we will make the change to importlib.resources. That will go in soon.