Last Updated: 2024-03-02
If a library (L2) changes where they a function, and you have another dependency (L1) that expects this library to be at this changed location, then try modifying the library import early in the program before L1 is required. Then L1 should be able to import from its old expected location, without the need for you to muck with forks and dependency versions.
from django.utils.encoding import smart_str
django.utils.encoding.smart_text = smart_str