~ubuntuone-pqm-team/django/stable

« back to all changes in this revision

Viewing changes to docs/internals/deprecation.txt

  • Committer: Matias Bordese
  • Date: 2014-08-21 21:22:40 UTC
  • Revision ID: matias.bordese@canonical.com-20140821212240-tij4ms6qzjbdiioz
Tags: 1.5.9
Imported Django 1.5.9 from released tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
:ref:`deprecation policy <internal-release-deprecation-policy>`. More details
8
8
about each item can often be found in the release notes of two versions prior.
9
9
 
 
10
1.5
 
11
---
 
12
 
 
13
See the :doc:`Django 1.3 release notes</releases/1.3>` for more details on
 
14
these changes.
 
15
 
 
16
* Starting Django without a :setting:`SECRET_KEY` will result in an exception
 
17
  rather than a ``DeprecationWarning``. (This is accelerated from the usual
 
18
  deprecation path; see the :doc:`Django 1.4 release notes</releases/1.4>`.)
 
19
 
 
20
* The ``mod_python`` request handler will be removed. The ``mod_wsgi``
 
21
  handler should be used instead.
 
22
 
 
23
* The ``template`` attribute on :class:`~django.test.client.Response`
 
24
  objects returned by the :ref:`test client <test-client>` will be removed.
 
25
  The :attr:`~django.test.client.Response.templates` attribute should be
 
26
  used instead.
 
27
 
 
28
* The ``django.test.simple.DjangoTestRunner`` will be removed.
 
29
  Instead use a unittest-native class.  The features of the
 
30
  ``django.test.simple.DjangoTestRunner`` (including fail-fast and
 
31
  Ctrl-C test termination) can currently be provided by the unittest-native
 
32
  :class:`~unittest.TextTestRunner`.
 
33
 
 
34
* The undocumented function
 
35
  ``django.contrib.formtools.utils.security_hash`` will be removed,
 
36
  instead use ``django.contrib.formtools.utils.form_hmac``
 
37
 
 
38
* The function-based generic view modules will be removed in favor of their
 
39
  class-based equivalents, outlined :doc:`here
 
40
  </topics/class-based-views/index>`.
 
41
 
 
42
* The ``django.core.servers.basehttp.AdminMediaHandler`` will be
 
43
  removed.  In its place use
 
44
  ``django.contrib.staticfiles.handlers.StaticFilesHandler``.
 
45
 
 
46
* The template tags library ``adminmedia`` and the template tag ``{%
 
47
  admin_media_prefix %}`` will be removed in favor of the generic static files
 
48
  handling. (This is faster than the usual deprecation path; see the
 
49
  :doc:`Django 1.4 release notes</releases/1.4>`.)
 
50
 
 
51
* The :ttag:`url` and :ttag:`ssi` template tags will be
 
52
  modified so that the first argument to each tag is a template variable, not
 
53
  an implied string. In 1.4, this behavior is provided by a version of the tag
 
54
  in the ``future`` template tag library.
 
55
 
 
56
* The ``reset`` and ``sqlreset`` management commands will be removed.
 
57
 
 
58
* Authentication backends will need to support an inactive user
 
59
  being passed to all methods dealing with permissions.
 
60
  The ``supports_inactive_user`` attribute will no longer be checked
 
61
  and can be removed from custom backends.
 
62
 
 
63
* :meth:`~django.contrib.gis.geos.GEOSGeometry.transform` will raise
 
64
  a :class:`~django.contrib.gis.geos.GEOSException` when called
 
65
  on a geometry with no SRID value.
 
66
 
 
67
* ``django.http.CompatCookie`` will be removed in favor of
 
68
  ``django.http.SimpleCookie``.
 
69
 
 
70
* ``django.core.context_processors.PermWrapper`` and
 
71
  ``django.core.context_processors.PermLookupDict`` will be removed in
 
72
  favor of the corresponding
 
73
  ``django.contrib.auth.context_processors.PermWrapper`` and
 
74
  ``django.contrib.auth.context_processors.PermLookupDict``, respectively.
 
75
 
 
76
* The :setting:`MEDIA_URL` or :setting:`STATIC_URL` settings will be
 
77
  required to end with a trailing slash to ensure there is a consistent
 
78
  way to combine paths in templates.
 
79
 
 
80
* ``django.db.models.fields.URLField.verify_exists`` will be removed. The
 
81
  feature was deprecated in 1.3.1 due to intractable security and
 
82
  performance issues and will follow a slightly accelerated deprecation
 
83
  timeframe.
 
84
 
 
85
* Translations located under the so-called *project path* will be ignored during
 
86
  the translation building process performed at runtime. The
 
87
  :setting:`LOCALE_PATHS` setting can be used for the same task by including the
 
88
  filesystem path to a ``locale`` directory containing non-app-specific
 
89
  translations in its value.
 
90
 
 
91
* The Markup contrib app will no longer support versions of Python-Markdown
 
92
  library earlier than 2.1. An accelerated timeline was used as this was
 
93
  a security related deprecation.
 
94
 
 
95
* The ``CACHE_BACKEND`` setting will be removed. The cache backend(s) should be
 
96
  specified in the :setting:`CACHES` setting.
 
97
 
10
98
1.6
11
99
---
12
100
 
41
129
  be accessible through their GB-prefixed names (GB is the correct
42
130
  ISO 3166 code for United Kingdom).
43
131
 
44
 
* The ``IGNORABLE_404_STARTS`` and ``IGNORABLE_404_ENDS`` settings have been
45
 
  superseded by :setting:`IGNORABLE_404_URLS` in the 1.4 release. They will be
46
 
  removed.
 
132
* The :setting:`IGNORABLE_404_STARTS` and :setting:`IGNORABLE_404_ENDS`
 
133
  settings have been superseded by :setting:`IGNORABLE_404_URLS` in
 
134
  the 1.4 release. They will be removed.
47
135
 
48
136
* The :doc:`form wizard </ref/contrib/formtools/form-wizard>` has been
49
137
  refactored to use class-based views with pluggable backends in 1.4.
82
170
  in 1.4. The backward compatibility will be removed --
83
171
  ``HttpRequest.raw_post_data`` will no longer work.
84
172
 
 
173
 
85
174
* The value for the ``post_url_continue`` parameter in
86
175
  ``ModelAdmin.response_add()`` will have to be either ``None`` (to redirect
87
176
  to the newly created object's edit page) or a pre-formatted url. String
128
217
* The ``depth`` keyword argument will be removed from
129
218
  :meth:`~django.db.models.query.QuerySet.select_related`.
130
219
 
131
 
* The undocumented ``get_warnings_state()``/``restore_warnings_state()``
132
 
  functions from :mod:`django.test.utils` and the ``save_warnings_state()``/
133
 
  ``restore_warnings_state()``
134
 
  :ref:`django.test.*TestCase <django-testcase-subclasses>` methods are
135
 
  deprecated. Use the :class:`warnings.catch_warnings` context manager
136
 
  available starting with Python 2.6 instead.
137
 
 
138
 
* The undocumented ``check_for_test_cookie`` method in
139
 
  :class:`~django.contrib.auth.forms.AuthenticationForm` will be removed
140
 
  following an accelerated deprecation. Users subclassing this form should
141
 
  remove calls to this method, and instead ensure that their auth related views
142
 
  are CSRF protected, which ensures that cookies are enabled.
143
 
 
144
 
* The version of :func:`django.contrib.auth.views.password_reset_confirm` that
145
 
  supports base36 encoded user IDs
146
 
  (``django.contrib.auth.views.password_reset_confirm_uidb36``) will be
147
 
  removed. If your site has been running Django 1.6 for more than
148
 
  :setting:`PASSWORD_RESET_TIMEOUT_DAYS`, this change will have no effect. If
149
 
  not, then any password reset links generated before you upgrade to Django 1.7
150
 
  won't work after the upgrade.
151
 
 
152
 
1.8
 
220
2.0
153
221
---
154
222
 
155
 
* ``django.contrib.comments`` will be removed.
156
 
 
157
 
* The following transaction management APIs will be removed:
158
 
 
159
 
  - ``TransactionMiddleware``,
160
 
  - the decorators and context managers ``autocommit``, ``commit_on_success``,
161
 
    and ``commit_manually``, defined in ``django.db.transaction``,
162
 
  - the functions ``commit_unless_managed`` and ``rollback_unless_managed``,
163
 
    also defined in ``django.db.transaction``,
164
 
  - the ``TRANSACTIONS_MANAGED`` setting.
165
 
 
166
 
  Upgrade paths are described in the :ref:`transaction management docs
167
 
  <transactions-upgrading-from-1.5>`.
168
 
 
169
 
* The :ttag:`cycle` and :ttag:`firstof` template tags will auto-escape their
170
 
  arguments. In 1.6 and 1.7, this behavior is provided by the version of these
171
 
  tags in the ``future`` template tag library.
172
 
 
173
 
* The ``SEND_BROKEN_LINK_EMAILS`` setting will be removed. Add the
174
 
  :class:`django.middleware.common.BrokenLinkEmailsMiddleware` middleware to
175
 
  your :setting:`MIDDLEWARE_CLASSES` setting instead.
176
 
 
177
 
* ``django.middleware.doc.XViewMiddleware`` will be removed. Use
178
 
  ``django.contrib.admindocs.middleware.XViewMiddleware`` instead.
179
 
 
180
 
* ``Model._meta.module_name`` was renamed to ``model_name``.
181
 
 
182
 
* Remove the backward compatible shims introduced to rename ``get_query_set``
183
 
  and similar queryset methods. This affects the following classes:
184
 
  ``BaseModelAdmin``, ``ChangeList``, ``BaseCommentNode``,
185
 
  ``GenericForeignKey``, ``Manager``, ``SingleRelatedObjectDescriptor`` and
186
 
  ``ReverseSingleRelatedObjectDescriptor``.
187
 
 
188
 
* Remove the backward compatible shims introduced to rename the attributes
189
 
  ``ChangeList.root_query_set`` and ``ChangeList.query_set``.
190
 
 
191
 
* ``django.views.defaults.shortcut`` will be removed, as part of the
 
223
* ``django.views.defaults.shortcut()``. This function has been moved
 
224
  to ``django.contrib.contenttypes.views.shortcut()`` as part of the
192
225
  goal of removing all ``django.contrib`` references from the core
193
 
  Django codebase. Instead use
194
 
  ``django.contrib.contenttypes.views.shortcut``. ``django.conf.urls.shortcut``
195
 
  will also be removed.
196
 
 
197
 
* Support for the Python Imaging Library (PIL) module will be removed, as it
198
 
  no longer appears to be actively maintained & does not work on Python 3.
199
 
  You are advised to install `Pillow`_, which should be used instead.
200
 
 
201
 
.. _`Pillow`: https://pypi.python.org/pypi/Pillow
202
 
 
203
 
* The following private APIs will be removed:
204
 
 
205
 
  - ``django.db.backend``
206
 
  - ``django.db.close_connection()``
207
 
  - ``django.db.backends.creation.BaseDatabaseCreation.set_autocommit()``
208
 
  - ``django.db.transaction.is_managed()``
209
 
  - ``django.db.transaction.managed()``
210
 
 
211
 
* ``django.forms.widgets.RadioInput`` will be removed in favor of
212
 
  ``django.forms.widgets.RadioChoiceInput``.
213
 
 
214
 
* The module ``django.test.simple`` and the class
215
 
  ``django.test.simple.DjangoTestSuiteRunner`` will be removed. Instead use
216
 
  ``django.test.runner.DiscoverRunner``.
217
 
 
218
 
* The module ``django.test._doctest`` will be removed. Instead use the doctest
219
 
  module from the Python standard library.
220
 
 
221
 
* The ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting will be removed.
222
 
 
223
 
* Usage of the hard-coded *Hold down "Control", or "Command" on a Mac, to select
224
 
  more than one.* string to override or append to user-provided ``help_text`` in
225
 
  forms for ManyToMany model fields will not be performed by Django anymore
226
 
  either at the model or forms layer.
227
 
 
228
 
* The ``Model._meta.get_(add|change|delete)_permission`` methods will
229
 
  be removed.
230
 
 
231
 
2.0
232
 
---
 
226
  Django codebase. The old shortcut will be removed in the 2.0
 
227
  release.
233
228
 
234
229
* ``ssi`` and ``url`` template tags will be removed from the ``future`` template
235
230
  tag library (used during the 1.3/1.4 deprecation period).