jazzband / django-newsletter

An email newsletter application for the Django web application framework, including an extended admin interface, web (un)subscription, dynamic e-mail templates, an archive and HTML email support.
GNU Affero General Public License v3.0
846 stars 204 forks source link

Using importlib instead of pkg_resources #391

Open newearthmartin opened 1 month ago

newearthmartin commented 1 month ago

To address this deprecation warning https://github.com/jazzband/django-newsletter/issues/390 I changed from pkg_resources to importlib.

Since importlib is available since Python 3.8 and django-newsletter supports Python 3.7, I included a conditional import which defaults to pkg_resources.