makinacorpus / django-leaflet

Use Leaflet in your Django projects
GNU Lesser General Public License v3.0
716 stars 282 forks source link

distutils has been deprecated in Python 3.10 #346

Closed tirkarthi closed 2 years ago

tirkarthi commented 2 years ago

https://www.python.org/dev/peps/pep-0632/#migration-advice

https://github.com/makinacorpus/django-leaflet/blob/f2d421632a065cdcac5fd3b3aac815f8e84df412/leaflet/__init__.py#L2

claudep commented 2 years ago

Looks like a "simple" if django.VERSION < (3, 2): would do the job and avoid requiring LooseVersion.

Gagaro commented 2 years ago

Thanks for the report, it's fixed :+1: .

rodolvbg-divineslns commented 2 years ago

Hi, @Gagaro, it seems that you have not released a new version after this change. I still get this warning. Could you please release a new one?

venv3.10/lib/python3.10/site-packages/leaflet/__init__.py:187: 10 warnings
  /home/charlie/PycharmProjects/maroon-bells/venv3.10/lib/python3.10/site-packages/leaflet/__init__.py:187: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(django.__version__) < LooseVersion('3.2'):
Gagaro commented 2 years ago

Released in 0.28.3