Skip to content

OpenVariant Bug | DeprecationWarning of pkg_resources #56

@dmartmillan

Description

@dmartmillan

Describe the issue

Working with OpenVariant in other projects we spotted this warning:

DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources

Reasons to consider:

What it means:

The openvariant package (one of your dependencies) uses pkg_resources internally in its __init__.py. 
pkg_resources is a module from setuptools that was historically used to inspect installed packages, load entry
points, and manage resources. The setuptools maintainers have deprecated it in favour of the standard
library's importlib.metadata (available since Python 3.8) and importlib.resources.

Why it appears:

It's not your code that's causing it ? it's openvariant's code. You can't fix it unless:

A newer version of openvariant is released that migrates away from pkg_resources, or
You suppress the warning in your pytest config.

Is it dangerous?

Not right now. It's a deprecation warning, not an error. It means pkg_resources might be removed in a future
setuptools release, which would then break openvariant ? but that's the openvariant maintainers' problem to
solve, not yours.

Steps to reproduce the bug

Running OpenVariant as a dependency.

Error encountered or actual result

DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources

Expected result

Not a warning.

OpenVariant version

1.0.0

Python version

3.10

OS

Ubuntu

Installation method

No response

Environment

No response

Other commentaries (optional)

No response

Contact details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions