-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
config option filterwarnings ignore::DeprecationWarning does not supress warnings #13145
Comments
Looks like those modules are loaded before pytest's settings are processed. You should be able to use |
Thanks for the advice, but I'm bit too novice to follow it. Found this in help: Tried this command which has not suppressed messages. Really not sure I got the command right.
Tried a few variations on the module name with varying 'invalid module name' errors. Seems to be quite different command format to the Stack Overflow articles I found on supressing warnings. Any idea what it expects as the 'module' parameter? |
It should probably be |
is this fixed in main, I changed when filters are applied/removed? |
@MarkusBiggus what package is this? Is it https://github.com/home-assistant/core/ ? could you link to a failing CI build? |
@MarkusBiggus from your log it seems like you're executing a separate Python process with the warning setting and then additionally attempt to execute pytest. That should be in the same command. As in Relevant interpreter docs: |
Thanks, that command did supress the warnings.
|
But it should work without having to pass it to |
Do you mean this way?
|
This is with 8.4? |
pytest 8.3.4 |
Ah can you try it with the unreleased 8.4 on main? |
Just had a quick look at main and saw no sign of 8.4. I've mastered the basics of github and not much else. |
here's a demo installing from git, showing the unreleased 8.4:
I'm running against https://github.com/MarkusBiggus/SonnenBackup/tree/8611f7d635219596fb4d473d089a4135ba26d266 but the tests won't run at all please advise how to run your suite, or try to run with pytest 8.4 in your configuration. |
Follow on from issue: config option filterwarnings ignore::DeprecationWarning:* crashes
Given the discussion, I should have mentioned the motivation for adding asterisk was because it didn't work without the asterisk. This is the real issue.
With Python3.12 when I tried to supress DeprecationWarning, I first used correct syntax:
Which still shows deprecation warnings with Python3.13 too:
I'd forgotten about it until Python3.13 crashed pytest.
pip list
O/S: Ubuntu 24.04.1 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)
pytest: Platform: linux, Python 3.13.0, pytest 8.3.4, pytest-sugar 1.0.0
The text was updated successfully, but these errors were encountered: