fix: improve deprecation error suppression
This commit is contained in:
parent
4cafadd38c
commit
7b338b7eb5
1 changed files with 5 additions and 6 deletions
|
|
@ -173,14 +173,13 @@ def repoze_sendmail_lf_fix():
|
|||
|
||||
def suppress_pkg_resources_warnings():
|
||||
"""
|
||||
Suppress pkg_resources deprecation warnings from pyramid.asset module.
|
||||
Suppress pkg_resources deprecation warnings from any module.
|
||||
|
||||
pkg_resources is deprecated as of setuptools 81+ and will be removed in 2025-11.
|
||||
This warning is generated by pyramid's asset resolution code which we cannot
|
||||
easily modify. The warning is informational only and does not affect functionality.
|
||||
This warning is generated by various modules including pyramid's asset resolution code
|
||||
which we cannot easily modify. The warning is informational only and does not affect functionality.
|
||||
"""
|
||||
import warnings
|
||||
|
||||
warnings.filterwarnings(
|
||||
"ignore", message="pkg_resources is deprecated as an API.*", category=UserWarning, module="pyramid.asset"
|
||||
)
|
||||
warnings.filterwarnings("ignore", message="pkg_resources is deprecated as an API.*", category=UserWarning)
|
||||
warnings.filterwarnings("ignore", message="pkg_resources is deprecated as an API.*", category=DeprecationWarning)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue