nav icon indicating copy to clipboard operation
nav copied to clipboard

Dependencies that (still) depend on pkg_resources

Open hmpf opened this issue 1 year ago • 5 comments

While with #2798 NAV itself no longer uses pkg_resources for anything, there are still warnings when running tests:

jnpr

.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
  /source/.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('jnpr')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

This library is a sub-dependency of something else.

sphinxcontrib-programoutput

.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
  /source/.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

This library is explicitly declared in "requirements/base.txt". There has been no new versions of this since 2021 and it is still on setup.py. It is BSD-licensed so it should be possible to vendor the code.

zope

.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
  /source/.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

This library is a sub-dependency of something else.

hmpf avatar Feb 20 '24 12:02 hmpf

jnpr

.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871
  /source/.tox/unit-py37-django32/lib/python3.7/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('jnpr')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

jnpr is actually the main namespace of the junos-eznc package, which is a requirement of the JunOS driver of the NAPALM library. Maybe we should file a bug report with https://github.com/Juniper/py-junos-eznc ?

Usage is directly from this file: https://github.com/Juniper/py-junos-eznc/blob/master/lib/jnpr/init.py

lunkwill42 avatar Feb 26 '24 11:02 lunkwill42

This library is explicitly declared in "requirements/base.txt". There has been no new versions of this since 2021 and it is still on setup.py. It is BSD-licensed so it should be possible to vendor the code.

A quick search seems to reveal there may be several packages that provide this same functionality, so we might also look into migrating to something else.

lunkwill42 avatar Feb 26 '24 11:02 lunkwill42

This library is a sub-dependency of something else.

twisted has a dependency to the package zope-interface. We are currently attempting to upgrade our twisted dependency, which may or may not affect this.

lunkwill42 avatar Feb 26 '24 11:02 lunkwill42

Assigning @johannaengland for now, mostly to look at the sphinxcontrib-programoutput part of the issue

lunkwill42 avatar Apr 29 '24 08:04 lunkwill42

twisted has a dependency to the package zope-interface. We are currently attempting to upgrade our twisted dependency, which may or may not affect this.

It does not, the current release of twisted still uses the same version of zope-interface as the version we currently use (22.8.0) uses.

johannaengland avatar May 15 '24 11:05 johannaengland