Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
philgyford opened this issue Oct 16, 2021 · 2 comments
Closed

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

philgyford opened this issue Oct 16, 2021 · 2 comments

Comments

@philgyford
Copy link

philgyford commented Oct 16, 2021

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
Copy link
Contributor

jaap3 commented Oct 19, 2021

This is already tackled in PR #534

@philgyford
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants