Diaoul / babelfish

BabelFish is a Python library to work with countries and languages
BSD 3-Clause "New" or "Revised" License
25 stars 13 forks source link

pkg_resources is deprecated #46

Closed plotski closed 2 months ago

plotski commented 1 year ago

Friendly reminder that pkg_resources is deprecated in favor of importlib.resources.

https://setuptools.pypa.io/en/latest/pkg_resources.html https://docs.python.org/3/library/importlib.resources.html

plotski commented 9 months ago

babelfish is now broken with Python's new 3.12 release:

    # Copyright (c) 2013 the BabelFish authors. All rights reserved.
    # Use of this source code is governed by the 3-clause BSD license
    # that can be found in the LICENSE file.
    #
>   from pkg_resources import iter_entry_points, EntryPoint
E   ModuleNotFoundError: No module named 'pkg_resources'

.tox/py312/lib/python3.12/site-packages/babelfish/converters/__init__.py:5: ModuleNotFoundError
iamkroot commented 9 months ago

I had to install setuptools>=66.1 to get it to work. Would be great if it gets fixed here itself.

Diaoul commented 9 months ago

Happy to have a PR fixing this. I can manage a new release but I don't think I'll have the time to fix it shortly 😞