Changes between Version 128 and Version 129 of BackwardsIncompatibleChanges


Ignore:
Timestamp:
Oct 21, 2007, 12:15:11 PM (17 years ago)
Author:
Malcolm Tredinnick
Comment:

Removed _() from builtins.

Legend:

Unmodified
Added
Removed
Modified
  • BackwardsIncompatibleChanges

    v128 v129  
    4040 * [6212] Sept. 14, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#django.http.HttpResponsenowhascase-insensitiveheaders HttpResponse now has case-insensitive headers, and response.headers is no longer directly accessible]
    4141 * [6289] Sept. 15, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Templatetagloadingrespectsdottednotation  Template tag loading respects dotted notation]
     42 * [6582] Oct. 21, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#_nolongerinbuiltins  _() no longer in builtins]
     43
    4244
    4345== Database constraint names changed ==
     
    400402
    401403Previously, anything before the final dot was ignored. If you were using this for any decorative purpose (at least one package was, it turns out), you have to remove any unwanted prefix.
     404
     405== _() no longer in builtins ==
     406
     407As of [6582], we no longer unconditionally install {{{_()}}} as an alias for {{{gettext()}}} in Python's builtins module. The reason for this is explained in the initial note in [http://www.djangoproject.com/documentation/i18n/#in-python-code this section] of the [http://www.djangoproject.com/documentation/i18n/ internationalization documentation].
     408
     409If you were previously relying on {{{_()}}} always being present, you should now explicitly import {{{ugettext}}} or {{{ugettext_lazy}}} or even {{{gettext}}}, if appropriate, and alias it to {{{_}}} yourself:
     410{{{
     411#!python
     412from django.utils.translation import ugettext as _
     413}}}
Back to Top