Skip to content

Version 1.4.0

Choose a tag to compare

@spectras spectras released this 10 Nov 19:10
1.4.0

Python and Django versions supported:

  • Support for Python 3.5 was added.
  • Support for Django 1.9 was added.
  • Django 1.6 is no longer officially supported.
  • Django 1.4 LTS has reached its end of life, and support will be dropped in hvad 1.5.
  • So, as a reminder, supported versions for this release are: 1.4 LTS, 1.7, 1.8 LTS, 1.9.

Compatibility Warnings:

  • As a result of the annotations fix (see below), applications that worked around
    QuerySet.annotate's shortcomings on translation
    querysets are likely to break, as annotate() has been fixed. The
    workarounds should be simply removed.
  • Method FallbackQueryset.use_fallbacks()
    is not supported on Django 1.9 and newer (and deprecated on other versions, see
    below). Please use TranslationQueryset.fallbacks() instead.
  • Translated admin no longer shows objects lacking a translation, starting from
    Django 1.9. This behavior will be extended to all Django versions in the next release.
    Such objects should not happen anyway, and throw a warning when encountered.
  • Translation model building has been refactored. It is functionally equivalent to its previous
    implementation (it passes the exact same test suite), but code depending on the internals
    and inner implementation details could break.

Deprecation List:

  • Method FallbackQueryset.use_fallbacks()
    is now deprecated on Django 1.6 and newer. The plan is to completely drop
    FallbackQueryset in the near future, and let
    TranslationManager.untranslated()
    default to returning a plain Django queryset, thus enabling
    MyModel.objects.untranslated() to give access to all features a plain
    Django queryset supports.
    For queries that need fallbacks, the use_fallbacks() method has long been
    superseded by TranslationQueryset.fallbacks(), which is
    better tested, uses simpler code yet supports more features.
    Please update your queries accordingly:
    MyModel.objects.untranslated().use_fallbacks('en', 'ja', 'fr') should be
    rewritten as MyModel.objects.language('en').fallbacks('ja', 'fr'), or even
    MyModel.objects.language().fallbacks() to have the query use your application's
    language settings automatically.

Fixes:

  • Annotations added to a TranslationQueryset using the
    QuerySet.annotate method no longer end up on
    the translation cache with a master__ prefix.
  • Specifying translation fields in unique_together on translatable models
    no longer causes Django to generate incorrect migrations. — #260.
  • When no Meta options are set on a TranslatableModelForm,
    the auto-created one now correctly inherits that of its first base class that
    has one set — #262.
  • Using language('all') together with values() no longer breaks — #264.