Switch to compatibility imports for gettext.

Review Request #11970 — Created Jan. 21, 2022 and submitted — Latest diff uploaded

Information

Django Evolution
release-2.x

Reviewers

Django deprecated the u-prefixed versions of the gettext methods,
removing them in 4.0. Since we support Django 1.6 on up, it's important
to use the right import for the right version of Django.

This adds a new django_evolution.compat.translation module, which
imports the correct versions and provides them under the new names. All
code has been switched over to this.

All unit tests pass on all supported versions of Django and Python.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Switch to compatibility imports for gettext.
Django deprecated the `u`-prefixed versions of the `gettext` methods, removing them in 4.0. Since we support Django 1.6 on up, it's important to use the right import for the right version of Django. This adds a new `django_evolution.compat.translation` module, which imports the correct versions and provides them under the new names. All code has been switched over to this.
195210caee0559de1ceb9a1b525db2f80606a8a1 Christian Hammond
django_evolution/diff.py
django_evolution/evolve.py
django_evolution/models.py
django_evolution/signature.py
django_evolution/compat/translation.py
django_evolution/management/commands/evolve.py
django_evolution/management/commands/list-evolutions.py
django_evolution/management/commands/migrate.py
django_evolution/management/commands/syncdb.py
django_evolution/management/commands/wipe-evolution.py
Loading...