georgkrause / language_data

An optional supplement to `langcodes` that stores names and statistics of languages.
MIT License
5 stars 1 forks source link

Remove deprecated pkg_resources usage #3

Open georgkrause opened 9 months ago

georgkrause commented 9 months ago

There is a pretty elegant solution in https://github.com/rspeer/language_data/pull/6 which should be ported before the next release

georgkrause commented 9 months ago

This cannot be done as long as we want to support python 3.8, I am therefore removing it from the Milestone

pdhall99 commented 2 months ago

This cannot be done as long as we want to support python 3.8, I am therefore removing it from the Milestone

importlib-resources could be added as an conditional dependency for python < 3.9, and then

import sys

if sys.version_info < (3, 9):
    from importlib_resources import files
else:
    from importlib.resources import files

I can make the changes if you'd accept this as a solution?

georgkrause commented 2 months ago

Python 3.8 is only supported until October 31, so instead of adding complexity I'd prefer to only remove the deprecated function when we stop supporting python 3.8.