Skip to content
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

pytest calls the deprecated writter in itself #7564

Closed
gaborbernat opened this issue Jul 29, 2020 · 1 comment
Closed

pytest calls the deprecated writter in itself #7564

gaborbernat opened this issue Jul 29, 2020 · 1 comment

Comments

@gaborbernat
Copy link
Contributor

gaborbernat commented Jul 29, 2020

within virtualenv test suite 👍 pytest 6.0.0

 /.pyenv/versions/3.8.5/lib/python3.8/runpy.py(194)_run_module_as_main()
-> return _run_code(code, main_globals, None,
  /.pyenv/versions/3.8.5/lib/python3.8/runpy.py(87)_run_code()
-> exec(code, run_globals)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/coverage/__main__.py(8)<module>()
-> sys.exit(main())
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/coverage/cmdline.py(865)main()
-> status = CoverageScript().command_line(argv)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/coverage/cmdline.py(582)command_line()
-> return self.do_run(options, args)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/coverage/cmdline.py(740)do_run()
-> runner.run()
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/coverage/execfile.py(247)run()
-> exec(code, main_mod.__dict__)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pytest/__main__.py(7)<module>()
-> raise SystemExit(pytest.console_main())
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py(180)console_main()
-> code = main()
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py(157)main()
-> ret = config.hook.pytest_cmdline_main(
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py(286)__call__()
-> return self._hookexec(self, self.get_hookimpls(), kwargs)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(93)_hookexec()
-> return self._inner_hookexec(hook, methods, kwargs)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(84)<lambda>()
-> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py(187)_multicall()
-> res = hook_impl.function(*args)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/main.py(289)pytest_cmdline_main()
-> return wrap_session(config, _main)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/main.py(238)wrap_session()
-> config.hook.pytest_sessionstart(session=session)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py(286)__call__()
-> return self._hookexec(self, self.get_hookimpls(), kwargs)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(93)_hookexec()
-> return self._inner_hookexec(hook, methods, kwargs)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(84)<lambda>()
-> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py(187)_multicall()
-> res = hook_impl.function(*args)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/fixtures.py(116)pytest_sessionstart()
-> session._fixturemanager = FixtureManager(session)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/fixtures.py(1463)__init__()
-> session.config.pluginmanager.register(self, "funcmanage")
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py(424)register()
-> ret = super().register(plugin, name)  # type: Optional[str]
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(127)register()
-> hook._maybe_apply_history(hookimpl)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py(333)_maybe_apply_history()
-> res = self._hookexec(self, [method], kwargs)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(93)_hookexec()
-> return self._inner_hookexec(hook, methods, kwargs)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py(84)<lambda>()
-> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py(187)_multicall()
-> res = hook_impl.function(*args)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/fixtures.py(1519)pytest_plugin_registered()
-> self.parsefactories(plugin, nodeid)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/fixtures.py(1634)parsefactories()
-> obj = safe_getattr(holderobj, name, None)
  /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/compat.py(340)safe_getattr()
-> return getattr(object, name, default)
> /git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/_pytest/terminal.py(345)writer()
-> warnings.warn(TERMINALWRITER_WRITER, stacklevel=2)
/git/github/virtualenv/.tox/dev/lib/python3.8/site-packages/_pytest/compat.py:340: PytestDeprecationWarning: The TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
See https://docs.pytest.org/en/stable/deprecations.html#terminalreporter-writer for more information.
  return getattr(object, name, default)
============================================================================================================================= test session starts ==============================================================================================================================
platform darwin -- Python 3.8.5, pytest-6.0.0, py-1.9.0, pluggy-0.13.1
Using --randomly-seed=3450123479
rootdir: /Users/bgabor8/git/github/virtualenv, configfile: setup.cfg
plugins: freezegun-0.4.2, randomly-3.4.1, env-0.6.2, mock-3.2.0, flaky-3.7.0, xdist-1.34.0, timeout-1.4.2, forked-1.3.0, xonsh-0.9.18
collected 1 item

Seems the warning is triggered when pytest is registering the TerminalReporter plugin, which checks if any of the attributes are of type FixtureFunctionMarker 🤔

@The-Compiler
Copy link
Member

Duplicate of #6936

@The-Compiler The-Compiler marked this as a duplicate of #6936 Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants