Fix `notifications` deprecation errors
brylie opened this issue · 25 comments
brylie commented
Description
When running management commands, I see the following deprecation warnings.
/OpenCiviWiki/.venv/lib/python3.10/site-packages/notifications/base/models.py:22: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if StrictVersion(get_version()) >= StrictVersion('1.8.0'):
/OpenCiviWiki/.venv/lib/python3.10/site-packages/notifications/views.py:20: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if StrictVersion(get_version()) >= StrictVersion('1.7.0'):
OpenCiviWiki/.venv/lib/python3.10/site-packages/notifications/urls.py:9: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
What should have happened?
There should be no deprecation errors when running management commands.
Upstream issue: django-notifications/django-notifications#344
DamyanBG commented
Hello, I want to contirbute.
DamyanBG commented
I made a PR.
DamyanBG commented
I found that my solution is wrong. I closed my PR. I will restart my work.
brylie commented
When creating a pull request that will resolve an issue, please link the pull request to the related issue(s) by using one of the supported keywords followed by the issue number.
For example:
Closes #<issue-number>
Further details
You can link a pull request to an issue by using a supported keyword in the pull request's description or in a commit message.
- close
- closes
- closed
- fix
- fixes
- fixed
- resolve
- resolves
- resolved
DamyanBG commented
I opened pull request.