1.10.12: pytest `DeprecationWarning` warning
Closed this issue · 3 comments
kloczek commented
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
- because I'm calling
build
with--no-isolation
I'm using during all processes only locally installed modules - install .whl file in </install/prefix>
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pydeps-1.10.12-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pydeps-1.10.12-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pydeps-1.10.12
plugins: mock-3.7.0, hypothesis-6.41.0
collected 41 items
tests/test_cli.py .... [ 9%]
tests/test_colors.py ..... [ 21%]
tests/test_cycles.py . [ 24%]
tests/test_dep2dot.py . [ 26%]
tests/test_dot.py ..... [ 39%]
tests/test_externals.py . [ 41%]
tests/test_file.py ... [ 48%]
tests/test_funny_names.py . [ 51%]
tests/test_json.py . [ 53%]
tests/test_package_names.py . [ 56%]
tests/test_py2dep.py . [ 58%]
tests/test_relative_imports.py ....... [ 75%]
tests/test_render_context.py ... [ 82%]
tests/test_skinny_package.py . [ 85%]
tests/test_skip.py ...... [100%]
============================================================================= warnings summary =============================================================================
pydeps/mf27.py:7
/home/tkloczko/rpmbuild/BUILD/pydeps-1.10.12/pydeps/mf27.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================================== 41 passed, 1 warning in 11.40s ======================================================================
thebjorn commented
Thanks for the report. I've filtered out the warnings (I don't feel to bad about it due to https://github.com/python/cpython/blob/3.7/Lib/modulefinder.py).
thebjorn commented
v1.10.14 is up on pypi and github releases.
kloczek commented
Just tested latest 1.10.14 and all looks clean now.
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pydeps-1.10.14-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pydeps-1.10.14-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pydeps-1.10.14, configfile: pytest.ini
collected 41 items
tests/test_cli.py .... [ 9%]
tests/test_colors.py ..... [ 21%]
tests/test_cycles.py . [ 24%]
tests/test_dep2dot.py . [ 26%]
tests/test_dot.py ..... [ 39%]
tests/test_externals.py . [ 41%]
tests/test_file.py ... [ 48%]
tests/test_funny_names.py . [ 51%]
tests/test_json.py . [ 53%]
tests/test_package_names.py . [ 56%]
tests/test_py2dep.py . [ 58%]
tests/test_relative_imports.py ....... [ 75%]
tests/test_render_context.py ... [ 82%]
tests/test_skinny_package.py . [ 85%]
tests/test_skip.py ...... [100%]
============================================================================ 41 passed in 7.80s ============================================================================
Thank you 😄