Author: lukeplant Date: 2009-11-14 13:13:33 -0600 (Sat, 14 Nov 2009) New Revision: 11738
Added: django/trunk/docs/releases/1.2.txt Removed: django/trunk/docs/releases/1.2-alpha.txt Modified: django/trunk/docs/index.txt django/trunk/docs/releases/1.1.txt django/trunk/docs/releases/index.txt Log: Fixed #12198 - CSRF changes not clearly noted in docs. The docs no longer unhelpfully point to BackwardsIncompatibleChanges, and instead a section has been added to help those upgrading and those following trunk. Tentative 1.2 release notes added. Modified: django/trunk/docs/index.txt =================================================================== --- django/trunk/docs/index.txt 2009-11-13 12:35:05 UTC (rev 11737) +++ django/trunk/docs/index.txt 2009-11-14 19:13:33 UTC (rev 11738) @@ -201,7 +201,5 @@ * **Django over time:** :ref:`API stability <misc-api-stability>` | - :ref:`Archive of release notes <releases-index>` | `Backwards-incompatible changes`_ | + :ref:`Release notes <releases-index>` | :ref:`Deprecation Timeline <internals-deprecation>` - -.. _Backwards-incompatible changes: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges Modified: django/trunk/docs/releases/1.1.txt =================================================================== --- django/trunk/docs/releases/1.1.txt 2009-11-13 12:35:05 UTC (rev 11737) +++ django/trunk/docs/releases/1.1.txt 2009-11-14 19:13:33 UTC (rev 11738) @@ -14,9 +14,11 @@ .. _new features: `What's new in Django 1.1`_ -Backwards-incompatible changes -============================== +.. _backwards-incompatible-changes-1.1: +Backwards-incompatible changes in 1.1 +===================================== + Django has a policy of :ref:`API stability <misc-api-stability>`. This means that, in general, code you develop against Django 1.0 should continue to work against 1.1 unchanged. However, we do sometimes make backwards-incompatible @@ -150,6 +152,8 @@ backwards-incompatible if you were using the ``redirect_to`` view with a format-string key called 'permanent', which is highly unlikely. +.. _deprecated-features-1.1: + Features deprecated in 1.1 ========================== Deleted: django/trunk/docs/releases/1.2-alpha.txt =================================================================== --- django/trunk/docs/releases/1.2-alpha.txt 2009-11-13 12:35:05 UTC (rev 11737) +++ django/trunk/docs/releases/1.2-alpha.txt 2009-11-14 19:13:33 UTC (rev 11738) @@ -1,52 +0,0 @@ - -Backwards-incompatible changes -============================== - -CSRF Protection ---------------- - -There have been large changes to the way that CSRF protection works, detailed in -:ref:`the CSRF documentaton <ref-contrib-csrf>`. The following are the major -changes that developers must be aware of: - - * ``CsrfResponseMiddleware`` and ``CsrfMiddleware`` have been deprecated, and - will be removed completely in Django 1.4, in favour of a template tag that - should be inserted into forms. - - * All contrib apps use a ``csrf_protect`` decorator to protect the view. This - requires the use of the csrf_token template tag in the template, so if you - have used custom templates for contrib views, you MUST READ THE UPGRADE - INSTRUCTIONS to fix those templates. - - * ``CsrfViewMiddleware`` is included in :setting:`MIDDLEWARE_CLASSES` by - default. This turns on CSRF protection by default, so that views that accept - POST requests need to be written to work with the middleware. Instructions - on how to do this are found in the CSRF docs. - - * All of the CSRF has moved from contrib to core (with backwards compatible - imports in the old locations, which are deprecated). - -LazyObject ----------- - -``LazyObject`` is an undocumented utility class used for lazily wrapping other -objects of unknown type. In Django 1.1 and earlier, it handled introspection in -a non-standard way, depending on wrapped objects implementing a public method -``get_all_members()``. Since this could easily lead to name clashes, it has been -changed to use the standard method, involving ``__members__`` and ``__dir__()``. -If you used ``LazyObject`` in your own code, and implemented the -``get_all_members()`` method for wrapped objects, you need to make the following -changes: - - * If your class does not have special requirements for introspection (i.e. you - have not implemented ``__getattr__()`` or other methods that allow for - attributes not discoverable by normal mechanisms), you can simply remove the - ``get_all_members()`` method. The default implementation on ``LazyObject`` - will do the right thing. - - * If you have more complex requirements for introspection, first rename the - ``get_all_members()`` method to ``__dir__()``. This is the standard method, - from Python 2.6 onwards, for supporting introspection. If you are require - support for Python < 2.6, add the following code to the class:: - - __members__ = property(lambda self: self.__dir__()) Copied: django/trunk/docs/releases/1.2.txt (from rev 11709, django/trunk/docs/releases/1.2-alpha.txt) =================================================================== --- django/trunk/docs/releases/1.2.txt (rev 0) +++ django/trunk/docs/releases/1.2.txt 2009-11-14 19:13:33 UTC (rev 11738) @@ -0,0 +1,70 @@ +.. _releases-1.2: + +============================================ +Django 1.2 release notes — UNDER DEVELOPMENT +============================================ + +This page documents release notes for the as-yet-unreleased Django 1.2. As such +it is tentative and subject to change. It provides up-to-date information for +those who are following trunk. + +.. _backwards-incompatible-changes-1.2: + +Backwards-incompatible changes in 1.2 +===================================== + +CSRF Protection +--------------- + +There have been large changes to the way that CSRF protection works, detailed in +:ref:`the CSRF documentaton <ref-contrib-csrf>`. The following are the major +changes that developers must be aware of: + + * ``CsrfResponseMiddleware`` and ``CsrfMiddleware`` have been deprecated, and + will be removed completely in Django 1.4, in favour of a template tag that + should be inserted into forms. + + * All contrib apps use a ``csrf_protect`` decorator to protect the view. This + requires the use of the csrf_token template tag in the template, so if you + have used custom templates for contrib views, you MUST READ THE UPGRADE + INSTRUCTIONS to fix those templates. + + * ``CsrfViewMiddleware`` is included in :setting:`MIDDLEWARE_CLASSES` by + default. This turns on CSRF protection by default, so that views that accept + POST requests need to be written to work with the middleware. Instructions + on how to do this are found in the CSRF docs. + + * All of the CSRF has moved from contrib to core (with backwards compatible + imports in the old locations, which are deprecated). + +LazyObject +---------- + +``LazyObject`` is an undocumented utility class used for lazily wrapping other +objects of unknown type. In Django 1.1 and earlier, it handled introspection in +a non-standard way, depending on wrapped objects implementing a public method +``get_all_members()``. Since this could easily lead to name clashes, it has been +changed to use the standard method, involving ``__members__`` and ``__dir__()``. +If you used ``LazyObject`` in your own code, and implemented the +``get_all_members()`` method for wrapped objects, you need to make the following +changes: + + * If your class does not have special requirements for introspection (i.e. you + have not implemented ``__getattr__()`` or other methods that allow for + attributes not discoverable by normal mechanisms), you can simply remove the + ``get_all_members()`` method. The default implementation on ``LazyObject`` + will do the right thing. + + * If you have more complex requirements for introspection, first rename the + ``get_all_members()`` method to ``__dir__()``. This is the standard method, + from Python 2.6 onwards, for supporting introspection. If you are require + support for Python < 2.6, add the following code to the class:: + + __members__ = property(lambda self: self.__dir__()) + +.. _deprecated-features-1.2: + +Features deprecated in 1.2 +========================== + +None. Modified: django/trunk/docs/releases/index.txt =================================================================== --- django/trunk/docs/releases/index.txt 2009-11-13 12:35:05 UTC (rev 11737) +++ django/trunk/docs/releases/index.txt 2009-11-14 19:13:33 UTC (rev 11738) @@ -24,11 +24,20 @@ 1.1-rc-1 1.1 -.. seealso:: +Upgrading +========= - The list of `backwards-incompatible changes`_ made in the current - development "trunk". If you're running versions of Django newer than an - official release, you should keep track of new pieces pointed there. It's - also fun reading if you're looking forward to new versions of Django. +For those upgrading to a new version of Django, you will need to check all the +backwards-incompatible changes and deprecated features for each 'final' release +from the one after your old version up to and including your new version. The +relevant sections of the release notes are linked below below for your +convenience. -.. _backwards-incompatible changes: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges +For those following trunk, the tentative release notes for the next version to +be released are also included at the bottom. This is kept up to date with new +features and changes that you need to be aware of. + + * :ref:`backwards-incompatible-changes-1.1` + * :ref:`deprecated-features-1.1` + * :ref:`backwards-incompatible-changes-1.2` + * :ref:`deprecated-features-1.2` -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=.