CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.32k stars 551 forks source link

Deprecation of pkg_resources in Python 3.11 #1557

Closed shaunporwal closed 9 months ago

shaunporwal commented 10 months ago

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

CamDavidsonPilon commented 10 months ago

Hi @shaunporwal, thanks for opening this issue.

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