0.24.0: pytest warning

Issue #147 resolved
Tomasz Kłoczko created an issue

Just normal build, install and test cycle used on building package from non-root account:

  • "setup.py build"
  • "setup.py install --root </install/prefix>"
  • "pytest with PYTHONPATH pointing to setearch and sitelib inside </install/prefix>

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pybtex-0.24.0-4.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pybtex-0.24.0-4.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (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/tkloczko/rpmbuild/BUILD/pybtex-0.24.0, configfile: setup.cfg, testpaths: pybtex, tests
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, Faker-8.9.0, cases-3.6.2
collected 402 items

pybtex/richtext.py ............................                                                                                                                      [  6%]
pybtex/textutils.py .....                                                                                                                                            [  8%]
pybtex/utils.py ....                                                                                                                                                 [  9%]
pybtex/backends/html.py ..                                                                                                                                           [  9%]
pybtex/backends/latex.py ..                                                                                                                                          [ 10%]
pybtex/backends/markdown.py .                                                                                                                                        [ 10%]
pybtex/bibtex/bst.py .                                                                                                                                               [ 10%]
pybtex/bibtex/names.py ...                                                                                                                                           [ 11%]
pybtex/bibtex/utils.py ............                                                                                                                                  [ 14%]
pybtex/database/__init__.py ........                                                                                                                                 [ 16%]
pybtex/database/input/bibtex.py .                                                                                                                                    [ 16%]
pybtex/database/output/bibtex.py ....                                                                                                                                [ 17%]
pybtex/database/output/bibtexml.py .                                                                                                                                 [ 17%]
pybtex/markup/__init__.py .                                                                                                                                          [ 18%]
pybtex/style/template.py ........                                                                                                                                    [ 20%]
pybtex/style/labels/alpha.py .                                                                                                                                       [ 20%]
pybtex/style/names/lastfirst.py .                                                                                                                                    [ 20%]
pybtex/style/names/plain.py .                                                                                                                                        [ 20%]
tests/backend_test.py .............                                                                                                                                  [ 24%]
tests/bibtex_parser_test.py ........................                                                                                                                 [ 30%]
tests/general_engine_test.py ........................                                                                                                                [ 36%]
tests/io_test.py ......                                                                                                                                              [ 37%]
tests/markup_test.py ..                                                                                                                                              [ 38%]
tests/parse_name_test.py ........................................................................................................                                    [ 63%]
tests/plugin_test.py .........                                                                                                                                       [ 66%]
tests/richtext_test.py ..................................................................................................................                            [ 94%]
tests/bst_parser_test/bst_parser_test.py ...                                                                                                                         [ 95%]
tests/database_test/database_test.py ...................                                                                                                             [100%]

============================================================================= warnings summary =============================================================================
pybtex/__version__.py:29
  /home/tkloczko/rpmbuild/BUILD/pybtex-0.24.0/pybtex/__version__.py:29: DeprecationWarning: pybtex.__version__.version is deprecated since 0.19: use pybtex.__version__ attribute
    warnings.warn(msg, DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
====================================================================== 402 passed, 1 warning in 3.99s ======================================================================

Comments (6)

  1. Matthias Troffaes

    The warning is caused by pytest importing a deprecated module. I think it’s good that pytest tries to import it (so there are no import errors), whilst the warning is completely expected and thus telling pytest to ignore it on that module is one way of conveying that fact to pytest. The other solution would be to ignore the file itself completely. But IMO that’s worse than just ignoring the warning. If you have a better solution, please share!

  2. Log in to comment