matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.27k stars 275 forks source link

Use of force_text and smart_text will break in Django 4.0 #541

Closed philgyford closed 2 years ago

philgyford commented 2 years ago

At https://github.com/matthewwithanm/django-imagekit/blob/develop/imagekit/lib.py#L38-L52 force_text and smart_text are imported from django.utils.encoding. However these are removed in Django 4.0, having been deprecated in Django 3.0 in favour of force_str and smart_str.

I can attempt to alter this, and add Django 4.0a1 to the tests, but I'm not clear on which versions of Django and python django-imagekit is aiming to support. The current imports have a clause to support Django < 1.5 and python 2: are they still required?

If so, I'm not 100% clear on how to handle the various possibilities here.

I don't know if there are other things that will break with 4.0, as this is as far as tests on my own code got.

[Edited a few times because of my confusion over what functions are named in which versions.]

jaap3 commented 2 years ago

This is already tackled in PR #534

philgyford commented 2 years ago

Sorry - I searched Issues but didn't think to check PRs too.