-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task/wp 209 fix deprecated warnings (part II) #852
Conversation
Codecov Report
@@ Coverage Diff @@
## main #852 +/- ##
=======================================
Coverage 63.05% 63.05%
=======================================
Files 427 427
Lines 12144 12144
Branches 2492 2492
=======================================
Hits 7658 7658
Misses 4281 4281
Partials 205 205
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM.
Just a note: The test ran only on this folder portal/apps/auth/api and there are no warnings.
In next PR, may be expand this to all portal/apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
server/pytest.ini
Outdated
ignore:.*Django now detects this configuration.*:django.utils.deprecation.RemovedInDjango41Warning | ||
|
||
markers = | ||
asyncio: mark a test as asyncio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline at end of file
asyncio: mark a test as asyncio. | |
asyncio: mark a test as asyncio. | |
ignore::DeprecationWarning:django.*: | ||
ignore::DeprecationWarning:openapi_schema_validator.*: | ||
ignore::DeprecationWarning:openapi_spec_validator.*: | ||
ignore::DeprecationWarning:openapi_core.*: | ||
ignore::DeprecationWarning:kombu.*: | ||
ignore::DeprecationWarning:pkg_resources.*: | ||
ignore:.*Django now detects this configuration.*:django.utils.deprecation.RemovedInDjango41Warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want these warnings removed? I think it might be better if we resolved the deprecation warnings, as in changed code to resolve the warnings, rather than suppressed the warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would require updating the Django version. There aren't any changes in our code to make that would resolve these warnings. Do you know when we are planning to update the Django version? We can add a note or ticket to review these warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@van-go , just so that we do not ignore this permanently, would it be possible to add tracking jira tasks and add the task number to the ini file (comments start with ';' in ini file, afaik).
- django version fix: 4.2.5
- openapi:
openapi_spec_validator 0.5.0
openapi_schema_validator 0.6.0
openapi_core 0.18 - kombu: 5.3.2.
- which third party throws : django.utils.deprecation.RemovedInDjango41Warning
Move channels to 4.0.0.
The edits for these will be in dependency list
Adding a note in task to remove the ignore when the task is fixed will ensure that the ignore is not left behind permanently.
Overview
This is a continuation from WP-171.
When running unit tests, a lot of deprecated warnings were appearing. This tickets addresses those warnings.
Related
Changes
The previous ticket [WP-171] addressed issues with our code (Core-Portal). However, a lot of the warnings being seen are issues with Django. To keep these from showing up, they are filtered out;
pytest.ini
now has'filterwanrings'
.PytestUnknownMarkWarning: Unknown pytest.mark.asyncio
was addressed by addingmarkers = asyncio: mark a test as asyncio
topytest.ini
RemovedInDjango40Warning: The providing_args argument is deprecated.
was addressed insignals.py
by redefiningportal_event
as suggested in the Django documentation.Testing
docker exec -it core_portal_django bash
pytest -ra portal/apps/auth/api/
UI
Notes
Running
pytest -ra portal/apps/
shows that some tests are failing, and also has 7 warnings (not deprecation warnings). These might need to be addressed.