omry / omegaconf

Flexible Python configuration system. The last one you will ever need.
BSD 3-Clause "New" or "Revised" License
1.91k stars 104 forks source link

CI failure: DeprecationWarning: pkg_resources is deprecated as an API #1068

Closed Jasha10 closed 1 year ago

Jasha10 commented 1 year ago

Describe the bug CI is failing due to a DeprecationWarning being emitted by setuptools.

Here's an example failure on master branch:

``` $ nox -s omegaconf-3.11 nox > Running session omegaconf-3.11 nox > Creating virtual environment (virtualenv) using python3.11 in .nox/omegaconf-3-11 nox > python -m pip install --upgrade setuptools pip nox > python -m pip install -r requirements/dev.txt . nox > pytest ============================================================= test session starts ============================================================= platform linux -- Python 3.11.0, pytest-7.3.0, pluggy-1.0.0 benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) rootdir: /home/homestar/dev/omegaconf configfile: pyproject.toml plugins: benchmark-4.0.0, lazy-fixture-0.6.3, mock-3.10.0 collected 8120 items / 2 errors =================================================================== ERRORS ==================================================================== _______________________________________________ ERROR collecting build_helpers/test_helpers.py ________________________________________________ build_helpers/test_helpers.py:6: in from build_helpers.build_helpers import find, find_version, matches build_helpers/build_helpers.py:13: in from setuptools.command import build_py, develop, sdist .nox/omegaconf-3-11/lib/python3.11/site-packages/setuptools/command/develop.py:8: in from setuptools.command.easy_install import easy_install .nox/omegaconf-3-11/lib/python3.11/site-packages/setuptools/command/easy_install.py:50: in from setuptools.sandbox import run_setup .nox/omegaconf-3-11/lib/python3.11/site-packages/setuptools/sandbox.py:13: in import pkg_resources .nox/omegaconf-3-11/lib/python3.11/site-packages/pkg_resources/__init__.py:121: in warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning) E DeprecationWarning: pkg_resources is deprecated as an API ____________________________________________ ERROR collecting tests/test_pydev_resolver_plugin.py _____________________________________________ tests/test_pydev_resolver_plugin.py:23: in from pydevd_plugins.extensions.pydevd_plugin_omegaconf import ( pydevd_plugins/__init__.py:2: in __import__("pkg_resources").declare_namespace(__name__) .nox/omegaconf-3-11/lib/python3.11/site-packages/pkg_resources/__init__.py:121: in warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning) E DeprecationWarning: pkg_resources is deprecated as an API =========================================================== short test summary info =========================================================== ERROR build_helpers/test_helpers.py - DeprecationWarning: pkg_resources is deprecated as an API ERROR tests/test_pydev_resolver_plugin.py - DeprecationWarning: pkg_resources is deprecated as an API !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============================================================== 2 errors in 1.51s ============================================================== nox > Command pytest failed with exit code 2 nox > Session omegaconf-3.11 failed. ```

I believe we can work around this by pinning the version of setuptools that is installed in the noxfile.

Jasha10 commented 1 year ago

Closed by #1069.