Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "RemovedInDjango40Warning: force_text()..." warning
Currently, as of Django 3.0 (https://docs.djangoproject.com/en/3.0/releases/3.0/#features-deprecated-in-3-0), importing `force_text` causes a warning notice. This can clutter up test runs as warnings are surfaced by `pytest`, and other tools may have this issue as well. The method has been renamed to `force_str`. However, note that `force_str` is not to be used with python 2.7, where you should instead continue to use `force_unicode`. This PR fixes this issue while supporting all known configurations of python and django versions.
- Loading branch information