Skip to content

Commit

Permalink
chore: ignore import ABCs from 'collections' warning
Browse files Browse the repository at this point in the history
related issue: openedx#33584

note: this warning is from a third party library (libsass)
  • Loading branch information
DanielVZ96 committed Nov 1, 2023
1 parent d2f427a commit ef0a9c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cms/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ filterwarnings =
ignore::xblock.exceptions.FieldDataDeprecationWarning
# Remove default_app_config warning after updating Django to 4.2
ignore:.*You can remove default_app_config.*:PendingDeprecationWarning
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

norecursedirs = envs
python_classes =
Expand Down
4 changes: 2 additions & 2 deletions common/test/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ filterwarnings =
ignore::xblock.exceptions.FieldDataDeprecationWarning
# Remove default_app_config warning after updating Django to 4.2
ignore:.*You can remove default_app_config.*:PendingDeprecationWarning
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
norecursedirs = .cache
6 changes: 6 additions & 0 deletions openedx/core/lib/logsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ def log_python_warnings():
category=DeprecationWarning,
module='elasticsearch'
)
warnings.filterwarnings(
'ignore',
'Using or importing the ABCs from \'collections\' instead of from \'collections.abc\' is deprecated.*',
category=DeprecationWarning,
module="sass",
)
# 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
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ filterwarnings =
# Remove default_app_config warning after updating Django to 4.2
ignore:.*You can remove default_app_config.*:PendingDeprecationWarning
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

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

0 comments on commit ef0a9c0

Please sign in to comment.