CiviWiki/OpenCiviWiki

Fix `notifications` deprecation errors

brylie opened this issue · 25 comments

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

Hello, I want to contirbute.

Thanks, @DamyanBG! I'll assign you to the issue.

I made a PR.

I found that my solution is wrong. I closed my PR. I will restart my work.

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

I opened pull request.