thebjorn/pydeps

1.9.14: pytest warnings

Closed this issue · 2 comments

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pydeps-1.9.14-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pydeps-1.9.14-2.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/pydeps-1.9.14
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.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, toolbox-0.5, 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, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, hypothesis-6.14.4, xprocess-0.18.1, black-0.3.12, checkdocs-2.7.1, anyio-3.3.0, Faker-8.11.0, asyncio-0.15.1, trio-0.7.0
collected 39 items

. .                                                                                                                                                                  [  2%]
tests/test_cli.py ..                                                                                                                                                 [  7%]
tests/test_colors.py .....                                                                                                                                           [ 20%]
tests/test_cycles.py .                                                                                                                                               [ 23%]
tests/test_dep2dot.py .                                                                                                                                              [ 25%]
tests/test_dot.py .....                                                                                                                                              [ 38%]
tests/test_externals.py .                                                                                                                                            [ 41%]
tests/test_file.py ...                                                                                                                                               [ 48%]
tests/test_funny_names.py .                                                                                                                                          [ 51%]
tests/test_json.py .                                                                                                                                                 [ 53%]
tests/test_py2dep.py .                                                                                                                                               [ 56%]
tests/test_relative_imports.py .......                                                                                                                               [ 74%]
tests/test_render_context.py ...                                                                                                                                     [ 82%]
tests/test_skinny_package.py .                                                                                                                                       [ 84%]
tests/test_skip.py ......                                                                                                                                            [100%]

============================================================================= warnings summary =============================================================================
tests/test_cli.py: 1 warning
tests/test_cycles.py: 1 warning
tests/test_dep2dot.py: 2 warnings
tests/test_externals.py: 2 warnings
tests/test_file.py: 3 warnings
tests/test_funny_names.py: 1 warning
tests/test_json.py: 1 warning
tests/test_py2dep.py: 1 warning
tests/test_relative_imports.py: 7 warnings
tests/test_skinny_package.py: 1 warning
tests/test_skip.py: 12 warnings
  /home/tkloczko/rpmbuild/BUILD/pydeps-1.9.14/pydeps/mf27.py:115: DeprecationWarning: 'U' mode is deprecated
    fp = open(pathname, READ_MODE)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
===================================================================== 39 passed, 32 warnings in 15.10s =====================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.

Hi @kloczek , sorry it took some time to reply to this (it arrived during my vacation ;-) ).

It seems like the correct solution will be to just always set READ_MODE = 'r', based on https://softwareengineering.stackexchange.com/questions/298677/why-is-universal-newlines-mode-deprecated-in-python/298685#298685

Fixed in d3c5fa1.