-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.17.2: pytest is failing because use deprecated pkg_resources
#951
Comments
Do you have to have |
Yes I have and you are right that part of those fails is because that modules is using [tkloczko@pers-jacek scikit-build-0.17.2]$ grep -r pkg_resources
pyproject.toml: 'ignore: pkg_resources is deprecated as an API:DeprecationWarning',
tests/__init__.py:import pkg_resources
tests/__init__.py: pkg_resources._initialize_master_working_set()
tests/pytest_helpers.py:from pkg_resources import parse_version |
FYI temporary in my build procedute I've added |
With
|
Yeah, we disable this one: Line 184 in bd8802f
Since it's coming from inside setuptools itself. (setuptools/command/test.py is calling it, not us). We'll be removing the "test" command customization soon, since it's heavily deprecated at this point. |
|
With latest PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-scikit-build-0.17.6-4.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-scikit-build-0.17.6-4.fc35.x86_64/usr/lib/python3.8/site-packages
/usr/bin/pytest -ra -m 'not network' -m 'not nosetuptoolsscm' --deselect tests/test_hello_cpp.py::test_hello_develop --deselect tests/test_issue274_support_default_package_dir.py::test_install_command --deselect tests/test_issue274_support_default_package_dir.py::test_test_command --deselect tests/test_issue274_support_one_package_without_package_dir.py::test_install_command --deselect tests/test_issue274_support_one_package_without_package_dir.py::test_test_command --deselect tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py::test_install_command --deselect 'tests/test_issue668_symbol_visibility.py::test_symbol_visibility[OFF]' --deselect 'tests/test_issue668_symbol_visibility.py::test_symbol_visibility[ON]'
ImportError while loading conftest '/home/tkloczko/rpmbuild/BUILD/scikit-build-0.17.6/tests/conftest.py'.
tests/__init__.py:22: in <module>
import pkg_resources
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:3328: in <module>
def _initialize_master_working_set():
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:3302: in _call_aside
f(*args, **kwargs)
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:3353: in _initialize_master_working_set
tuple(dist.activate(replace=False) for dist in working_set)
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:3353: in <genexpr>
tuple(dist.activate(replace=False) for dist in working_set)
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: in activate
declare_namespace(pkg)
/usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2339: in declare_namespace
warnings.warn(msg, DeprecationWarning, stacklevel=2)
E DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
E 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 |
That’s not triggered by scikit-build. You have a sphinxcontrib extension installed that is triggering it. The old mechanism hooked onto the import system. |
Though I should see if we can avoid importing pkgutils. |
Latest
pytest
7.3.1 and latestsetuptools
67.6.1.Excample ho to replace
pkg_resources
on use namespaces mcmtroffaes/sphinxcontrib-bibtex@65153f78The text was updated successfully, but these errors were encountered: