simonvh / norns

Simple yaml-based config module
MIT License
0 stars 0 forks source link

DeprecationWarning: pkg_resources #9

Open antonylebechec opened 9 months ago

antonylebechec commented 9 months ago

Hi,

A deprecated warning appear when using pyfaidx:

================== warnings summary ===================
/tools/python/current/lib/python3.10/site-packages/norns/cfg.py:9: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

It seems to be this code location: https://github.com/simonvh/norns/blob/master/norns/cfg.py#L9

As mentioned in the provided URL:

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0] on linux SetupTools 68.2.2