question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node.warn(code, message) form has been deprecated, use Node.warn(warning_instance) instead

See original GitHub issue

With pytest 3.9.2 and pytest-bdd 3.0.0 I get this:

________________ ERROR at teardown of test_match_benchmark[webkit] _________________

tp = <class '_pytest.warning_types.RemovedInPytest4Warning'>, value = None
tb = None

    def reraise(tp, value, tb=None):
        try:
            if value is None:
                value = tp()
            if value.__traceback__ is not tb:
                raise value.with_traceback(tb)
>           raise value

.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
    raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
    raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/pytest_benchmark/fixture.py:252: in _cleanup
    warner=self._warner, suspend=True)
.tox/py37-pyqt511/lib/python3.7/site-packages/pytest_benchmark/logger.py:40: in warn
    warner(code=code, message=text)
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
    raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
    raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
    raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/pytest_benchmark/fixture.py:252: in _cleanup
    warner=self._warner, suspend=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_benchmark.logger.Logger object at 0x7f5e2c139400>
code = 'BENCHMARK-U1', text = 'Benchmark fixture was not used at all in this test!'
warner = <bound method Node.warn of <Function 'test_show_benchmark[webkit]'>>
suspend = True, fslocation = None

    def warn(self, code, text, warner=None, suspend=False, fslocation=None):
        if self.verbose:
            if suspend and self.capman:
                self.capman.suspendcapture(in_=True)
            self.term.line("")
            self.term.sep("-", red=True, bold=True)
            self.term.write(" WARNING: ", red=True, bold=True)
            self.term.line(text, red=True)
            self.term.sep("-", red=True, bold=True)
            if suspend and self.capman:
                self.capman.resumecapture()
        if warner is None:
            warner = self.pytest_warn
        if fslocation and self.pytest_warn_has_fslocation:
            warner(code=code, message=text, fslocation=fslocation)
        else:
>           warner(code=code, message=text)
E           _pytest.warning_types.RemovedInPytest4Warning: Node.warn(code, message) form has been deprecated, use Node.warn(warning_instance) instead.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ionelmccommented, Jan 7, 2019

Released 3.2.0 now.

0reactions
ofekcommented, Jan 7, 2019

Master appears to be passing with 4.1. Anything else blocking the release?

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM warn message about deprecated package - Stack Overflow
I got an answer for the similar question: https://stackoverflow.com/a/36335866/1115187. Briefly: npm outdated --depth=3.
Read more >
Deprecations and Removals — pytest documentation
Instance , and importing it emits a deprecation warning. ... node.warn("CI", "some message") : this code/message form has been removed and should be ......
Read more >
Issues - GitHub
DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at G:\SNWS\sn-micro-front-web-project-template ...
Read more >
Node.warn( ) help - General - Node-RED Forum
A line of text in the debug window to the right. Not wanting to be difficult, but can I send multiple lines of...
Read more >
python-pytest-test-3.10.1-bp151.1.1 - SUSE Package Hub
The warning instance must be a PytestWarning or subclass instance. + node.warn("CI", "some message"): this code/message form is now deprecated and should be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found