-
-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For example: ``` .tox/anypy/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:1004: 50 warnings /Users/nedbatchelder/coverage/trunk/.tox/anypy/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:1004: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead expl_format = self.pop_format_context(ast.Str(expl)) ```
- Loading branch information
Showing
2 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@nedbat
A wild guess: these are suppressed per-test, so they likely don't suppress warnings coming from pytest's own internal machinery… Plus, having them in Python lets one do conditionals like the one with PyPy below. I've actually been considering writing a plugin for such cases because at some point I was adding certain deprecation suppressions only under certain pytest or Python versions. Also, it's sometimes harder to reason about how those regexes are escaped by a parser in an ini-file which
setup.cfg
essentially is. It might be better withpyproject.toml
.