2
0

deprecation.txt 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. ===========================
  2. Django Deprecation Timeline
  3. ===========================
  4. This document outlines when various pieces of Django will be removed or altered
  5. in a backward incompatible way, following their deprecation, as per the
  6. :ref:`deprecation policy <internal-release-deprecation-policy>`. More details
  7. about each item can often be found in the release notes of two versions prior.
  8. .. _deprecation-removed-in-2.0:
  9. 2.0
  10. ---
  11. * ``cycle`` and ``firstof`` template tags will be removed from the ``future``
  12. template tag library (used during the 1.6/1.7 deprecation period).
  13. * ``django.conf.urls.patterns()`` will be removed.
  14. * Support for the ``prefix`` argument to
  15. ``django.conf.urls.i18n.i18n_patterns()`` will be removed.
  16. * ``SimpleTestCase.urls`` will be removed.
  17. * Using an incorrect count of unpacked values in the ``for`` template tag
  18. will raise an exception rather than fail silently.
  19. * The ``DatabaseCreation`` class on each database backend will be removed,
  20. and all table/schema editing will be moved to be via ``SchemaEditor`` instead.
  21. * The ability to :func:`~django.core.urlresolvers.reverse` URLs using a dotted
  22. Python path will be removed.
  23. * Support for :py:mod:`optparse` will be dropped for custom management commands
  24. (replaced by :py:mod:`argparse`).
  25. * The class :class:`~django.core.management.NoArgsCommand` will be removed. Use
  26. :class:`~django.core.management.BaseCommand` instead, which takes no arguments
  27. by default.
  28. * ``django.template.resolve_variable`` will be removed.
  29. * The ``error_message`` argument of ``django.forms.RegexField`` will be removed.
  30. * The ``unordered_list`` filter will no longer support old style lists.
  31. * Support for string ``view`` arguments to ``url()`` will be removed.
  32. * The backward compatible shim to rename ``django.forms.Form._has_changed()``
  33. to ``has_changed()`` will be removed.
  34. * The ``removetags`` template filter will be removed.
  35. * The ``remove_tags()`` and ``strip_entities()`` functions in
  36. ``django.utils.html`` will be removed.
  37. .. _deprecation-removed-in-1.9:
  38. 1.9
  39. ---
  40. See the :ref:`Django 1.7 release notes<deprecated-features-1.7>` for more
  41. details on these changes.
  42. * ``django.utils.dictconfig`` will be removed.
  43. * ``django.utils.importlib`` will be removed.
  44. * ``django.utils.tzinfo`` will be removed.
  45. * ``django.utils.unittest`` will be removed.
  46. * The ``syncdb`` command will be removed.
  47. * ``django.db.models.signals.pre_syncdb`` and
  48. ``django.db.models.signals.post_syncdb`` will be removed.
  49. * ``allow_syncdb`` on database routers will no longer automatically become
  50. ``allow_migrate``.
  51. * The legacy method of syncing apps without migrations will be removed,
  52. and migrations will become compulsory for all apps. This includes automatic
  53. loading of ``initial_data`` fixtures and support for initial SQL data.
  54. * All models will need to be defined inside an installed application or
  55. declare an explicit :attr:`~django.db.models.Options.app_label`.
  56. Furthermore, it won't be possible to import them before their application
  57. is loaded. In particular, it won't be possible to import models inside
  58. the root package of their application.
  59. * If models are organized in a package, Django will no longer look for
  60. :ref:`initial SQL data<initial-sql>` in ``myapp/models/sql/``. Move your
  61. custom SQL files to ``myapp/sql/``.
  62. * The model and form ``IPAddressField`` will be removed.
  63. * ``AppCommand.handle_app()`` will no longer be supported.
  64. * ``RequestSite`` will be located in ``django.contrib.sites.requests`` and
  65. ``get_current_site`` in ``django.contrib.sites.shortcuts``.
  66. * FastCGI support via the ``runfcgi`` management command will be
  67. removed. Please deploy your project using WSGI.
  68. * ``django.utils.datastructures.SortedDict`` will be removed. Use
  69. :class:`collections.OrderedDict` from the Python standard library instead.
  70. * ``ModelAdmin.declared_fieldsets`` will be removed.
  71. * Instances of ``util.py`` in the Django codebase have been renamed to
  72. ``utils.py`` in an effort to unify all util and utils references.
  73. The modules that provided backwards compatibility will be removed:
  74. * ``django.contrib.admin.util``
  75. * ``django.contrib.gis.db.backends.util``
  76. * ``django.db.backends.util``
  77. * ``django.forms.util``
  78. * ``ModelAdmin.get_formsets`` will be removed.
  79. * Remove the backward compatible shims introduced to rename the
  80. ``BaseMemcachedCache._get_memcache_timeout()`` method to
  81. ``get_backend_timeout()``.
  82. * The ``--natural`` and ``-n`` options for :djadmin:`dumpdata` will be removed.
  83. Use :djadminopt:`--natural-foreign` instead.
  84. * The ``use_natural_keys`` argument for ``serializers.serialize()`` will be
  85. removed. Use ``use_natural_foreign_keys`` instead.
  86. * ``django.forms.get_declared_fields`` will be removed.
  87. * The ability to use a ``SplitDateTimeWidget`` with ``DateTimeField`` will be
  88. removed.
  89. * The ``WSGIRequest.REQUEST`` property will be removed.
  90. * The class ``django.utils.datastructures.MergeDict`` will be removed.
  91. * The ``zh-cn`` and ``zh-tw`` language codes will be removed and have been
  92. replaced by the ``zh-hans`` and ``zh-hant`` language code respectively.
  93. * The internal ``django.utils.functional.memoize`` will be removed.
  94. * ``django.core.cache.get_cache`` will be removed. Add suitable entries
  95. to :setting:`CACHES` and use :data:`django.core.cache.caches` instead.
  96. * ``django.db.models.loading`` will be removed.
  97. * Passing callable arguments to querysets will no longer be possible.
  98. * ``BaseCommand.requires_model_validation`` will be removed in favor of
  99. ``requires_system_checks``. Admin validators will be replaced by admin
  100. checks.
  101. * ``ModelAdmin.validator`` will be removed in favor of the new ``checks``
  102. attribute.
  103. * ``django.db.backends.DatabaseValidation.validate_field`` will be removed in
  104. favor of the ``check_field`` method.
  105. * ``django.utils.module_loading.import_by_path`` will be removed in favor of
  106. ``django.utils.module_loading.import_string``.
  107. * ``ssi`` and ``url`` template tags will be removed from the ``future`` template
  108. tag library (used during the 1.3/1.4 deprecation period).
  109. * ``django.utils.text.javascript_quote`` will be removed.
  110. * Database test settings as independent entries in the database settings,
  111. prefixed by ``TEST_``, will no longer be supported.
  112. * The `cache_choices` option to :class:`~django.forms.ModelChoiceField` and
  113. :class:`~django.forms.ModelMultipleChoiceField` will be removed.
  114. .. _deprecation-removed-in-1.8:
  115. 1.8
  116. ---
  117. See the :ref:`Django 1.6 release notes<deprecated-features-1.6>` for more
  118. details on these changes.
  119. * ``django.contrib.comments`` will be removed.
  120. * The following transaction management APIs will be removed:
  121. - ``TransactionMiddleware``,
  122. - the decorators and context managers ``autocommit``, ``commit_on_success``,
  123. and ``commit_manually``, defined in ``django.db.transaction``,
  124. - the functions ``commit_unless_managed`` and ``rollback_unless_managed``,
  125. also defined in ``django.db.transaction``,
  126. - the ``TRANSACTIONS_MANAGED`` setting.
  127. Upgrade paths are described in the :ref:`transaction management docs
  128. <transactions-upgrading-from-1.5>`.
  129. * The :ttag:`cycle` and :ttag:`firstof` template tags will auto-escape their
  130. arguments. In 1.6 and 1.7, this behavior is provided by the version of these
  131. tags in the ``future`` template tag library.
  132. * The ``SEND_BROKEN_LINK_EMAILS`` setting will be removed. Add the
  133. :class:`django.middleware.common.BrokenLinkEmailsMiddleware` middleware to
  134. your :setting:`MIDDLEWARE_CLASSES` setting instead.
  135. * ``django.middleware.doc.XViewMiddleware`` will be removed. Use
  136. ``django.contrib.admindocs.middleware.XViewMiddleware`` instead.
  137. * ``Model._meta.module_name`` was renamed to ``model_name``.
  138. * Remove the backward compatible shims introduced to rename ``get_query_set``
  139. and similar queryset methods. This affects the following classes:
  140. ``BaseModelAdmin``, ``ChangeList``, ``BaseCommentNode``,
  141. ``GenericForeignKey``, ``Manager``, ``SingleRelatedObjectDescriptor`` and
  142. ``ReverseSingleRelatedObjectDescriptor``.
  143. * Remove the backward compatible shims introduced to rename the attributes
  144. ``ChangeList.root_query_set`` and ``ChangeList.query_set``.
  145. * ``django.views.defaults.shortcut`` will be removed, as part of the
  146. goal of removing all ``django.contrib`` references from the core
  147. Django codebase. Instead use
  148. ``django.contrib.contenttypes.views.shortcut``. ``django.conf.urls.shortcut``
  149. will also be removed.
  150. * Support for the Python Imaging Library (PIL) module will be removed, as it
  151. no longer appears to be actively maintained & does not work on Python 3.
  152. You are advised to install `Pillow`_, which should be used instead.
  153. .. _`Pillow`: https://pypi.python.org/pypi/Pillow
  154. * The following private APIs will be removed:
  155. - ``django.db.backend``
  156. - ``django.db.close_connection()``
  157. - ``django.db.backends.creation.BaseDatabaseCreation.set_autocommit()``
  158. - ``django.db.transaction.is_managed()``
  159. - ``django.db.transaction.managed()``
  160. * ``django.forms.widgets.RadioInput`` will be removed in favor of
  161. ``django.forms.widgets.RadioChoiceInput``.
  162. * The module ``django.test.simple`` and the class
  163. ``django.test.simple.DjangoTestSuiteRunner`` will be removed. Instead use
  164. ``django.test.runner.DiscoverRunner``.
  165. * The module ``django.test._doctest`` will be removed. Instead use the doctest
  166. module from the Python standard library.
  167. * The ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting will be removed.
  168. * Usage of the hard-coded *Hold down "Control", or "Command" on a Mac, to select
  169. more than one.* string to override or append to user-provided ``help_text`` in
  170. forms for ManyToMany model fields will not be performed by Django anymore
  171. either at the model or forms layer.
  172. * The ``Model._meta.get_(add|change|delete)_permission`` methods will
  173. be removed.
  174. * The session key ``django_language`` will no longer be read for backwards
  175. compatibility.
  176. * Geographic Sitemaps will be removed
  177. (``django.contrib.gis.sitemaps.views.index`` and
  178. ``django.contrib.gis.sitemaps.views.sitemap``).
  179. * ``django.utils.html.fix_ampersands``, the ``fix_ampersands`` template filter and
  180. ``django.utils.html.clean_html`` will be removed following an accelerated deprecation.
  181. .. _deprecation-removed-in-1.7:
  182. 1.7
  183. ---
  184. See the :ref:`Django 1.5 release notes<deprecated-features-1.5>` for more
  185. details on these changes.
  186. * The module ``django.utils.simplejson`` will be removed. The standard library
  187. provides :mod:`json` which should be used instead.
  188. * The function ``django.utils.itercompat.product`` will be removed. The Python
  189. builtin version should be used instead.
  190. * Auto-correction of INSTALLED_APPS and TEMPLATE_DIRS settings when they are
  191. specified as a plain string instead of a tuple will be removed and raise an
  192. exception.
  193. * The ``mimetype`` argument to the ``__init__`` methods of
  194. :class:`~django.http.HttpResponse`,
  195. :class:`~django.template.response.SimpleTemplateResponse`, and
  196. :class:`~django.template.response.TemplateResponse`, will be removed.
  197. ``content_type`` should be used instead. This also applies to the
  198. :func:`~django.shortcuts.render_to_response` shortcut and
  199. the sitemap views, :func:`~django.contrib.sitemaps.views.index` and
  200. :func:`~django.contrib.sitemaps.views.sitemap`.
  201. * When :class:`~django.http.HttpResponse` is instantiated with an iterator,
  202. or when :attr:`~django.http.HttpResponse.content` is set to an iterator,
  203. that iterator will be immediately consumed.
  204. * The ``AUTH_PROFILE_MODULE`` setting, and the ``get_profile()`` method on
  205. the User model, will be removed.
  206. * The ``cleanup`` management command will be removed. It's replaced by
  207. ``clearsessions``.
  208. * The ``daily_cleanup.py`` script will be removed.
  209. * The ``depth`` keyword argument will be removed from
  210. :meth:`~django.db.models.query.QuerySet.select_related`.
  211. * The undocumented ``get_warnings_state()``/``restore_warnings_state()``
  212. functions from :mod:`django.test.utils` and the ``save_warnings_state()``/
  213. ``restore_warnings_state()``
  214. :ref:`django.test.*TestCase <django-testcase-subclasses>` methods are
  215. deprecated. Use the :class:`warnings.catch_warnings` context manager
  216. available starting with Python 2.6 instead.
  217. * The undocumented ``check_for_test_cookie`` method in
  218. :class:`~django.contrib.auth.forms.AuthenticationForm` will be removed
  219. following an accelerated deprecation. Users subclassing this form should
  220. remove calls to this method, and instead ensure that their auth related views
  221. are CSRF protected, which ensures that cookies are enabled.
  222. * The version of :func:`django.contrib.auth.views.password_reset_confirm` that
  223. supports base36 encoded user IDs
  224. (``django.contrib.auth.views.password_reset_confirm_uidb36``) will be
  225. removed. If your site has been running Django 1.6 for more than
  226. :setting:`PASSWORD_RESET_TIMEOUT_DAYS`, this change will have no effect. If
  227. not, then any password reset links generated before you upgrade to Django 1.7
  228. won't work after the upgrade.
  229. * The ``django.utils.encoding.StrAndUnicode`` mix-in will be removed.
  230. Define a ``__str__`` method and apply the
  231. :func:`~django.utils.encoding.python_2_unicode_compatible` decorator instead.
  232. .. _deprecation-removed-in-1.6:
  233. 1.6
  234. ---
  235. See the :ref:`Django 1.4 release notes<deprecated-features-1.4>` for more
  236. details on these changes.
  237. * ``django.contrib.databrowse`` will be removed.
  238. * ``django.contrib.localflavor`` will be removed following an accelerated
  239. deprecation.
  240. * ``django.contrib.markup`` will be removed following an accelerated
  241. deprecation.
  242. * The compatibility modules ``django.utils.copycompat`` and
  243. ``django.utils.hashcompat`` as well as the functions
  244. ``django.utils.itercompat.all`` and ``django.utils.itercompat.any`` will
  245. be removed. The Python builtin versions should be used instead.
  246. * The ``csrf_response_exempt`` and ``csrf_view_exempt`` decorators will
  247. be removed. Since 1.4 ``csrf_response_exempt`` has been a no-op (it
  248. returns the same function), and ``csrf_view_exempt`` has been a
  249. synonym for ``django.views.decorators.csrf.csrf_exempt``, which should
  250. be used to replace it.
  251. * The ``django.core.cache.backends.memcached.CacheClass`` backend
  252. was split into two in Django 1.3 in order to introduce support for
  253. PyLibMC. The historical ``CacheClass`` will be removed in favor of
  254. ``django.core.cache.backends.memcached.MemcachedCache``.
  255. * The UK-prefixed objects of ``django.contrib.localflavor.uk`` will only
  256. be accessible through their GB-prefixed names (GB is the correct
  257. ISO 3166 code for United Kingdom).
  258. * The ``IGNORABLE_404_STARTS`` and ``IGNORABLE_404_ENDS`` settings have been
  259. superseded by :setting:`IGNORABLE_404_URLS` in the 1.4 release. They will be
  260. removed.
  261. * The :doc:`form wizard </ref/contrib/formtools/form-wizard>` has been
  262. refactored to use class-based views with pluggable backends in 1.4.
  263. The previous implementation will be removed.
  264. * Legacy ways of calling
  265. :func:`~django.views.decorators.cache.cache_page` will be removed.
  266. * The backward-compatibility shim to automatically add a debug-false
  267. filter to the ``'mail_admins'`` logging handler will be removed. The
  268. :setting:`LOGGING` setting should include this filter explicitly if
  269. it is desired.
  270. * The builtin truncation functions ``django.utils.text.truncate_words()``
  271. and ``django.utils.text.truncate_html_words()`` will be removed in
  272. favor of the ``django.utils.text.Truncator`` class.
  273. * The :class:`~django.contrib.gis.geoip.GeoIP` class was moved to
  274. :mod:`django.contrib.gis.geoip` in 1.4 -- the shortcut in
  275. :mod:`django.contrib.gis.utils` will be removed.
  276. * ``django.conf.urls.defaults`` will be removed. The functions
  277. :func:`~django.conf.urls.include`, :func:`~django.conf.urls.patterns` and
  278. :func:`~django.conf.urls.url` plus :data:`~django.conf.urls.handler404`,
  279. :data:`~django.conf.urls.handler500`, are now available through
  280. :mod:`django.conf.urls` .
  281. * The functions ``setup_environ()`` and ``execute_manager()`` will be removed
  282. from :mod:`django.core.management`. This also means that the old (pre-1.4)
  283. style of :file:`manage.py` file will no longer work.
  284. * Setting the ``is_safe`` and ``needs_autoescape`` flags as attributes of
  285. template filter functions will no longer be supported.
  286. * The attribute ``HttpRequest.raw_post_data`` was renamed to ``HttpRequest.body``
  287. in 1.4. The backward compatibility will be removed --
  288. ``HttpRequest.raw_post_data`` will no longer work.
  289. * The value for the ``post_url_continue`` parameter in
  290. ``ModelAdmin.response_add()`` will have to be either ``None`` (to redirect
  291. to the newly created object's edit page) or a pre-formatted url. String
  292. formats, such as the previous default ``'../%s/'``, will not be accepted any
  293. more.
  294. .. _deprecation-removed-in-1.5:
  295. 1.5
  296. ---
  297. See the :ref:`Django 1.3 release notes<deprecated-features-1.3>` for more
  298. details on these changes.
  299. * Starting Django without a :setting:`SECRET_KEY` will result in an exception
  300. rather than a ``DeprecationWarning``. (This is accelerated from the usual
  301. deprecation path; see the :doc:`Django 1.4 release notes</releases/1.4>`.)
  302. * The ``mod_python`` request handler will be removed. The ``mod_wsgi``
  303. handler should be used instead.
  304. * The ``template`` attribute on ``django.test.client.Response``
  305. objects returned by the :ref:`test client <test-client>` will be removed.
  306. The :attr:`~django.test.Response.templates` attribute should be
  307. used instead.
  308. * The ``django.test.simple.DjangoTestRunner`` will be removed.
  309. Instead use a unittest-native class. The features of the
  310. ``django.test.simple.DjangoTestRunner`` (including fail-fast and
  311. Ctrl-C test termination) can currently be provided by the unittest-native
  312. :class:`~unittest.TextTestRunner`.
  313. * The undocumented function
  314. ``django.contrib.formtools.utils.security_hash`` will be removed,
  315. instead use ``django.contrib.formtools.utils.form_hmac``
  316. * The function-based generic view modules will be removed in favor of their
  317. class-based equivalents, outlined :doc:`here
  318. </topics/class-based-views/index>`.
  319. * The ``django.core.servers.basehttp.AdminMediaHandler`` will be
  320. removed. In its place use
  321. ``django.contrib.staticfiles.handlers.StaticFilesHandler``.
  322. * The template tags library ``adminmedia`` and the template tag ``{%
  323. admin_media_prefix %}`` will be removed in favor of the generic static files
  324. handling. (This is faster than the usual deprecation path; see the
  325. :doc:`Django 1.4 release notes</releases/1.4>`.)
  326. * The :ttag:`url` and :ttag:`ssi` template tags will be
  327. modified so that the first argument to each tag is a template variable, not
  328. an implied string. In 1.4, this behavior is provided by a version of the tag
  329. in the ``future`` template tag library.
  330. * The ``reset`` and ``sqlreset`` management commands will be removed.
  331. * Authentication backends will need to support an inactive user
  332. being passed to all methods dealing with permissions.
  333. The ``supports_inactive_user`` attribute will no longer be checked
  334. and can be removed from custom backends.
  335. * :meth:`~django.contrib.gis.geos.GEOSGeometry.transform` will raise
  336. a :class:`~django.contrib.gis.geos.GEOSException` when called
  337. on a geometry with no SRID value.
  338. * ``django.http.CompatCookie`` will be removed in favor of
  339. ``django.http.SimpleCookie``.
  340. * ``django.core.context_processors.PermWrapper`` and
  341. ``django.core.context_processors.PermLookupDict`` will be removed in
  342. favor of the corresponding
  343. ``django.contrib.auth.context_processors.PermWrapper`` and
  344. ``django.contrib.auth.context_processors.PermLookupDict``, respectively.
  345. * The :setting:`MEDIA_URL` or :setting:`STATIC_URL` settings will be
  346. required to end with a trailing slash to ensure there is a consistent
  347. way to combine paths in templates.
  348. * ``django.db.models.fields.URLField.verify_exists`` will be removed. The
  349. feature was deprecated in 1.3.1 due to intractable security and
  350. performance issues and will follow a slightly accelerated deprecation
  351. timeframe.
  352. * Translations located under the so-called *project path* will be ignored during
  353. the translation building process performed at runtime. The
  354. :setting:`LOCALE_PATHS` setting can be used for the same task by including the
  355. filesystem path to a ``locale`` directory containing non-app-specific
  356. translations in its value.
  357. * The Markup contrib app will no longer support versions of Python-Markdown
  358. library earlier than 2.1. An accelerated timeline was used as this was
  359. a security related deprecation.
  360. * The ``CACHE_BACKEND`` setting will be removed. The cache backend(s) should be
  361. specified in the :setting:`CACHES` setting.
  362. .. _deprecation-removed-in-1.4:
  363. 1.4
  364. ---
  365. See the :ref:`Django 1.2 release notes<deprecated-features-1.2>` for more
  366. details on these changes.
  367. * ``CsrfResponseMiddleware`` and ``CsrfMiddleware`` will be removed. Use
  368. the ``{% csrf_token %}`` template tag inside forms to enable CSRF
  369. protection. ``CsrfViewMiddleware`` remains and is enabled by default.
  370. * The old imports for CSRF functionality (``django.contrib.csrf.*``),
  371. which moved to core in 1.2, will be removed.
  372. * The ``django.contrib.gis.db.backend`` module will be removed in favor
  373. of the specific backends.
  374. * ``SMTPConnection`` will be removed in favor of a generic Email backend API.
  375. * The many to many SQL generation functions on the database backends
  376. will be removed.
  377. * The ability to use the ``DATABASE_*`` family of top-level settings to
  378. define database connections will be removed.
  379. * The ability to use shorthand notation to specify a database backend
  380. (i.e., ``sqlite3`` instead of ``django.db.backends.sqlite3``) will be
  381. removed.
  382. * The ``get_db_prep_save``, ``get_db_prep_value`` and
  383. ``get_db_prep_lookup`` methods will have to support multiple databases.
  384. * The ``Message`` model (in ``django.contrib.auth``), its related
  385. manager in the ``User`` model (``user.message_set``), and the
  386. associated methods (``user.message_set.create()`` and
  387. ``user.get_and_delete_messages()``), will be removed. The
  388. :doc:`messages framework </ref/contrib/messages>` should be used
  389. instead. The related ``messages`` variable returned by the
  390. auth context processor will also be removed. Note that this
  391. means that the admin application will depend on the messages
  392. context processor.
  393. * Authentication backends will need to support the ``obj`` parameter for
  394. permission checking. The ``supports_object_permissions`` attribute
  395. will no longer be checked and can be removed from custom backends.
  396. * Authentication backends will need to support the ``AnonymousUser`` class
  397. being passed to all methods dealing with permissions. The
  398. ``supports_anonymous_user`` variable will no longer be checked and can be
  399. removed from custom backends.
  400. * The ability to specify a callable template loader rather than a
  401. ``Loader`` class will be removed, as will the ``load_template_source``
  402. functions that are included with the built in template loaders for
  403. backwards compatibility.
  404. * ``django.utils.translation.get_date_formats()`` and
  405. ``django.utils.translation.get_partial_date_formats()``. These functions
  406. will be removed; use the locale-aware
  407. ``django.utils.formats.get_format()`` to get the appropriate formats.
  408. * In ``django.forms.fields``, the constants: ``DEFAULT_DATE_INPUT_FORMATS``,
  409. ``DEFAULT_TIME_INPUT_FORMATS`` and
  410. ``DEFAULT_DATETIME_INPUT_FORMATS`` will be removed. Use
  411. ``django.utils.formats.get_format()`` to get the appropriate
  412. formats.
  413. * The ability to use a function-based test runner will be removed,
  414. along with the ``django.test.simple.run_tests()`` test runner.
  415. * The ``views.feed()`` view and ``feeds.Feed`` class in
  416. ``django.contrib.syndication`` will be removed. The class-based view
  417. ``views.Feed`` should be used instead.
  418. * ``django.core.context_processors.auth``. This release will
  419. remove the old method in favor of the new method in
  420. ``django.contrib.auth.context_processors.auth``.
  421. * The ``postgresql`` database backend will be removed, use the
  422. ``postgresql_psycopg2`` backend instead.
  423. * The ``no`` language code will be removed and has been replaced by the
  424. ``nb`` language code.
  425. * Authentication backends will need to define the boolean attribute
  426. ``supports_inactive_user`` until version 1.5 when it will be assumed that
  427. all backends will handle inactive users.
  428. * ``django.db.models.fields.XMLField`` will be removed. This was
  429. deprecated as part of the 1.3 release. An accelerated deprecation
  430. schedule has been used because the field hasn't performed any role
  431. beyond that of a simple ``TextField`` since the removal of ``oldforms``.
  432. All uses of ``XMLField`` can be replaced with ``TextField``.
  433. * The undocumented ``mixin`` parameter to the ``open()`` method of
  434. ``django.core.files.storage.Storage`` (and subclasses) will be removed.
  435. .. _deprecation-removed-in-1.3:
  436. 1.3
  437. ---
  438. See the :ref:`Django 1.1 release notes<deprecated-features-1.1>` for more
  439. details on these changes.
  440. * ``AdminSite.root()``. This method of hooking up the admin URLs will be
  441. removed in favor of including ``admin.site.urls``.
  442. * Authentication backends need to define the boolean attributes
  443. ``supports_object_permissions`` and ``supports_anonymous_user`` until
  444. version 1.4, at which point it will be assumed that all backends will
  445. support these options.