LBeaudoux / iso639

A fast, simple ISO 639 library.
MIT License
33 stars 5 forks source link

Python 3.12 compatibility - setuptools dependency #16

Closed tijmenbaarda closed 12 months ago

tijmenbaarda commented 1 year ago

I am gratefully using the iso639-lang package, but when testing on Python 3.12 problems occurred because in Python 3.12 setuptools is not by default installed in virtual environments [1], which is needed for resource_filename. setuptools can neither be included as a dependency because it is blocked by tools like pip-compile.

I saw that resource_filename has been replaced by importlib.resources.files, which solves the problem, but it is new in Python 3.9 and its backport package importlib_resources requires Python 3.8.

I can fix the problem for myself for now by manually installing setuptools in my virtual environment, but I thought you may want to fix it for a future version. I would be happy to make a pull request, but I was wondering about your thoughts.

[1] https://github.com/python/cpython/issues/95299

LBeaudoux commented 1 year ago

I would be happy to make a pull request, but I was wondering about your thoughts.

Thank you for letting me know about this issue. Your suggestion sounds great and I'd be delighted to merge your pull request. I plan to release a new version of iso639-lang that will discontinue support for python 3.6-3.7 and update ISO 639-3 data.

tijmenbaarda commented 1 year ago

Thanks, I will prepare the pull request in the coming few days!

LBeaudoux commented 1 year ago

The iso639-lang repo now includes the latest ISO 639-3 data changes. I've also updated the GitHub Actions tests so that they cover Python 3.8 to Python 3.12 when you make your pull request. Thanks again for your help.