Skip to content

DeprecationWarning: pkg_resources #212

Closed
@antonylebechec

Description

Hi,

A deprecated warning appear when using pyfaidx:

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

It seems to be this code location:
https://github.com/mdshw5/pyfaidx/blob/master/pyfaidx/__init__.py#L21

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

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions