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
Filter some pytest warnings #98689
Filter some pytest warnings #98689
Conversation
35c6266
to
c3ad3e9
Compare
pyproject.toml
Outdated
"ignore:module '(sre_parse|sre_constants)' is deprecate:DeprecationWarning:lark.utils", | ||
# https://pypi.org/project/lomond/ - v0.3.3 - 2018-09-21 | ||
"ignore:ssl.PROTOCOL_TLS is deprecated:DeprecationWarning:lomond.session", | ||
# https://pypi.org/project/paho-mqtt/ - v1.6.1 - 2021-10-21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope paho-mqtt isn't unmaintained. It's a corner stone for many things MQTT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope so too but at the moment it isn't looking good. The last commit was 7 months ago. I can remove the entry here if you like.
https://github.com/eclipse/paho.mqtt.python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look good. Found this post on the mailing list: https://www.eclipse.org/lists/paho-dev/msg04742.html
Anyway, the deprecation is also tracked upstream, so moved the entry to the another section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A really helpful PR, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Proposed change
Ignore unhelpful warnings to make it easier to spot the important ones.
The current pytest warnings overview is quite cluttered with a lot of DeprecationWarnings. In most cases we can't even do anything about it or they are already tracked upstream. There is no need for us to keep them around in our pytest output. Nobody is going to read 100+ entries just to find the one we can / should actually fix. As example, the logs from a recent Actions run on
dev
: https://github.com/home-assistant/core/suites/15266074255/artifacts/872069112All pytest logs can be downloaded via the
pytest-<run_no>
artifact from the run summary view.I've added warnings filter for the following categories:
warnings.catch_warnings
.https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings
Those might still be fixed but there is no telling when and it would likely be wasted time to try and fix them.
Whenever possible I tried to be as precise as possible when adding a new entry. For example almost all filters are only applied to specific modules.
I've also added comments for each entry to make it easier to check if these are still needed in the future.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: