config option filterwarnings ignore::DeprecationWarning:* crashes with regex exception: PatternError #13119
Labels
good first issue
easy issue that is friendly to new contributor
topic: config
related to config handling, argument parsing and config file
topic: reporting
related to terminal output and user-facing messages and errors
Since Python3.13 upgrade there are many deprecation warnings from packages. These are not my concern, I'm sure the maintainers will sort things out by the time they need to. If they don't it won't be a warning and I'll see the error.
Found a number of forum posts on how to suppress DeprecationWarning using different methods, none of which worked in current version of pytest.
This syntax in pytest.ini seemed like a fairly succinct way to suppress all DeprecationWarning messages, but it didn't.
Forgot about the change that did nothing at the time.
After Python3.13 upgrade pytest crashed every time.
Eventually found it was this filterwarnings line:
It might be that this is invalid syntax edge case, in which case the line can be ignored with an appropriate (non-fatal) error message.
What would be terrific is if it actually did suppress all DeprecationWarning messages, as the syntax suggests.
Crash is easily reproduced:
Packages installed:
OS: Ubuntu 24.04.1 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)
Python 3.13.0
The text was updated successfully, but these errors were encountered: