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.

DeprecationWarnings when pytest fails

See original GitHub issue

When running tests you get a lot of these messages:

PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.

It should be easily fixable!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
northwestwitchcommented, Aug 20, 2021

Deprecation messages

  • DeprecationWarning: The ‘with’ extension is deprecated and will be removed in Jinja 3.1. This is built in now.
  • DeprecationWarning: Required is going away in WTForms 3.0, use DataRequired
  • DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated since Python 3.3, and in 3.10 it will stop working
  • DeprecationWarning: ‘ident_func’ is deprecated and will be removed in Werkzeug 2.1. It should not be used in Python 3.7+.
  • DeprecationWarning: np.float is a deprecated alias for the builtin float. To silence this warning, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
  • DeprecationWarning: insert is deprecated. Use insert_one or insert_many instead.
  • DeprecationWarning: The ‘attachment_filename’ parameter has been renamed to ‘download_name’. The old name will be removed in Flask 2.1.
  • DeprecationWarning: The ‘cache_timeout’ parameter has been renamed to ‘max_age’. The old name will be removed in Flask 2.1.
  • DeprecationWarning: The TextField alias for StringField has been deprecated and will be removed in WTForms 3.0
1reaction
mikaellcommented, Aug 20, 2021

Ok, we can leave this open.

One PR has created today 😃 #2799

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to capture warnings — pytest documentation
By default pytest will display DeprecationWarning and PendingDeprecationWarning warnings from user code and third-party libraries, as recommended by PEP 565.
Read more >
How to suppress py.test internal deprecation warnings
It seems that pytest completely removes filters, because it shows all those DeprecationWarning when running, and Python's documentation ...
Read more >
Tests fail with python 3.10 due to "DeprecationWarning: The ...
LC_ALL=C.UTF-8 python -m ase test --verbose About to run pytest with these parameters: -v --capture=no ImportError while loading conftest ...
Read more >
Pytest treating warning as exception - Running Tests
I'm running pytest with: python -m pytest tests/ -vv -rsx However, it is treating warnings as errors: ERROR collecting ...
Read more >
warnings — Warning control — Python 3.11.1 documentation
Changed in version 3.7: Previously DeprecationWarning and FutureWarning were ... to turn a warning into an error we simply raise category(message) .
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