More PytestDeprecationWarnings: TerminalReporter.writer attribute is deprecated
bnavigator opened this issue · 3 comments
bnavigator commented
Hi,
FYI, similar to #26:
[ 3s] ============================= test session starts ==============================
[ 3s] platform linux -- Python 3.8.4, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
[ 3s] cachedir: .pytest_cache
[ 3s] rootdir: /home/abuild/rpmbuild/BUILD/pytest-flakes-4.0.1, inifile: tox.ini
[ 3s] plugins: flakes-4.0.1
[ 3s] collecting ... collected 7 items
[ 3s]
...
[ 3s]
[ 3s] =============================== warnings summary ===============================
[ 3s] test_flakes.py::test_unused_import
[ 3s] test_flakes.py::test_syntax_error
[ 3s] test_flakes.py::test_noqa
[ 3s] test_flakes.py::test_pep263
[ 3s] test_flakes.py::test_non_py_ext
[ 3s] test_flakes.py::test_flakesignore
[ 3s] /usr/lib/python3.8/site-packages/_pytest/compat.py:333: PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
[ 3s] See https://docs.pytest.org/en/latest/deprecations.html#terminalreporter-writer for more information.
[ 3s] return getattr(object, name, default)
asmeurer commented
I've seen that error, but I can't tell where it is coming from. pytest-flakes doesn't seem to be using TerminalReporter.writer or even getattr.
asmeurer commented
Tried debugging this some more. It comes from somewhere in pluggy and the pytest internals. I can't tell if pytest-flakes is triggering it or if it is coming from something else.
bluetech commented
The property has been entirely removed since pytest 6.1.0, and indeed pytets-flakes does not use it itself. So the issue can be closed here.