Skip to content

Commit

Permalink
chore: ignore warning from pkg_resources.declare_namespace
Browse files Browse the repository at this point in the history
Related issue: #33592
  • Loading branch information
DanielVZ96 committed Nov 1, 2023
1 parent 115c65a commit 9752da2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cms/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ filterwarnings =
ignore:.*You can remove default_app_config.*:PendingDeprecationWarning
# ABC deprecation Warning comes from libsass
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated.*:DeprecationWarning:sass
# declare_namespace Warning comes from XBlock https://github.com/openedx/XBlock/issues/641
# and also due to dependency: https://github.com/PyFilesystem/pyfilesystem2
ignore:Deprecated call to `pkg_resources.declare_namespace.*:DeprecationWarning
ignore:.*pkg_resources is deprecated as an API.*:DeprecationWarning

norecursedirs = envs
python_classes =
Expand Down
5 changes: 5 additions & 0 deletions common/test/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ filterwarnings =
ignore:.*You can remove default_app_config.*:PendingDeprecationWarning
# ABC deprecation Warning comes from libsass
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated.*:DeprecationWarning:sass
# declare_namespace Warning comes from XBlock https://github.com/openedx/XBlock/issues/641
# and also due to dependency: https://github.com/PyFilesystem/pyfilesystem2
ignore:Deprecated call to `pkg_resources.declare_namespace.*:DeprecationWarning
ignore:.*pkg_resources is deprecated as an API.*:DeprecationWarning

norecursedirs = .cache
10 changes: 10 additions & 0 deletions openedx/core/lib/logsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ def log_python_warnings():
category=DeprecationWarning,
module="sass",
)
warnings.filterwarnings(
'ignore',
'Deprecated call to `pkg_resources.declare_namespace.*',
category=DeprecationWarning,
)
warnings.filterwarnings(
'ignore',
'.*pkg_resources is deprecated as an API.*',
category=DeprecationWarning,
)
# try:
# # There are far too many of these deprecation warnings in startup to output for every management command;
# # suppress them until we've fixed at least the most common ones as reported by the test suite
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ filterwarnings =
ignore:Instead access HTTPResponse.headers directly.*:DeprecationWarning:elasticsearch
# ABC deprecation Warning comes from libsass
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated.*:DeprecationWarning:sass
# declare_namespace Warning comes from XBlock https://github.com/openedx/XBlock/issues/641
# and also due to dependency: https://github.com/PyFilesystem/pyfilesystem2
ignore:Deprecated call to `pkg_resources.declare_namespace.*:DeprecationWarning
ignore:.*pkg_resources is deprecated as an API.*:DeprecationWarning

junit_family = xunit2
norecursedirs = .* *.egg build conf dist node_modules test_root cms/envs lms/envs
Expand Down

0 comments on commit 9752da2

Please sign in to comment.