deprecation.txt 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  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-5.0:
  9. 5.0
  10. ---
  11. See the :ref:`Django 4.0 release notes <deprecated-features-4.0>` for more
  12. details on these changes.
  13. * The ``SERIALIZE`` test setting will be removed.
  14. * The undocumented ``django.utils.baseconv`` module will be removed.
  15. * The undocumented ``django.utils.datetime_safe`` module will be removed.
  16. * The default value of the ``USE_TZ`` setting will change from ``False`` to
  17. ``True``.
  18. * The default sitemap protocol for sitemaps built outside the context of a
  19. request will change from ``'http'`` to ``'https'``.
  20. * The ``extra_tests`` argument for ``DiscoverRunner.build_suite()`` and
  21. ``DiscoverRunner.run_tests()`` will be removed.
  22. * The ``django.contrib.postgres.aggregates.ArrayAgg``, ``JSONBAgg``, and
  23. ``StringAgg`` aggregates will return ``None`` when there are no rows instead
  24. of ``[]``, ``[]``, and ``''`` respectively.
  25. * The ``USE_L10N`` setting will be removed.
  26. * The ``USE_DEPRECATED_PYTZ`` transitional setting will be removed.
  27. * Support for ``pytz`` timezones will be removed.
  28. * The ``is_dst`` argument will be removed from:
  29. * ``QuerySet.datetimes()``
  30. * ``django.utils.timezone.make_aware()``
  31. * ``django.db.models.functions.Trunc()``
  32. * ``django.db.models.functions.TruncSecond()``
  33. * ``django.db.models.functions.TruncMinute()``
  34. * ``django.db.models.functions.TruncHour()``
  35. * ``django.db.models.functions.TruncDay()``
  36. * ``django.db.models.functions.TruncWeek()``
  37. * ``django.db.models.functions.TruncMonth()``
  38. * ``django.db.models.functions.TruncQuarter()``
  39. * ``django.db.models.functions.TruncYear()``
  40. * The ``django.contrib.gis.admin.GeoModelAdmin`` and ``OSMGeoAdmin`` classes
  41. will be removed.
  42. * The undocumented ``BaseForm._html_output()`` method will be removed.
  43. * The ability to return a ``str``, rather than a ``SafeString``, when rendering
  44. an ``ErrorDict`` and ``ErrorList`` will be removed.
  45. See the :ref:`Django 4.1 release notes <deprecated-features-4.1>` for more
  46. details on these changes.
  47. .. _deprecation-removed-in-4.1:
  48. 4.1
  49. ---
  50. See the :ref:`Django 3.2 release notes <deprecated-features-3.2>` for more
  51. details on these changes.
  52. * Support for assigning objects which don't support creating deep copies with
  53. ``copy.deepcopy()`` to class attributes in ``TestCase.setUpTestData()`` will
  54. be removed.
  55. * ``BaseCommand.requires_system_checks`` won't support boolean values.
  56. * The ``whitelist`` argument and ``domain_whitelist`` attribute of
  57. ``django.core.validators.EmailValidator`` will be removed.
  58. * The ``default_app_config`` module variable will be removed.
  59. * ``TransactionTestCase.assertQuerysetEqual()`` will no longer automatically
  60. call ``repr()`` on a queryset when compared to string values.
  61. * ``django.core.cache.backends.memcached.MemcachedCache`` will be removed.
  62. * Support for the pre-Django 3.2 format of messages used by
  63. ``django.contrib.messages.storage.cookie.CookieStorage`` will be removed.
  64. .. _deprecation-removed-in-4.0:
  65. 4.0
  66. ---
  67. See the :ref:`Django 3.0 release notes <deprecated-features-3.0>` for more
  68. details on these changes.
  69. * ``django.utils.http.urlquote()``, ``urlquote_plus()``, ``urlunquote()``, and
  70. ``urlunquote_plus()`` will be removed.
  71. * ``django.utils.encoding.force_text()`` and ``smart_text()`` will be removed.
  72. * ``django.utils.translation.ugettext()``, ``ugettext_lazy()``,
  73. ``ugettext_noop()``, ``ungettext()``, and ``ungettext_lazy()`` will be
  74. removed.
  75. * ``django.views.i18n.set_language()`` will no longer set the user language in
  76. ``request.session`` (key ``django.utils.translation.LANGUAGE_SESSION_KEY``).
  77. * ``alias=None`` will be required in the signature of
  78. ``django.db.models.Expression.get_group_by_cols()`` subclasses.
  79. * ``django.utils.text.unescape_entities()`` will be removed.
  80. * ``django.utils.http.is_safe_url()`` will be removed.
  81. See the :ref:`Django 3.1 release notes <deprecated-features-3.1>` for more
  82. details on these changes.
  83. * The ``PASSWORD_RESET_TIMEOUT_DAYS`` setting will be removed.
  84. * The undocumented usage of the :lookup:`isnull` lookup with non-boolean values
  85. as the right-hand side will no longer be allowed.
  86. * The ``django.db.models.query_utils.InvalidQuery`` exception class will be
  87. removed.
  88. * The ``django-admin.py`` entry point will be removed.
  89. * The ``HttpRequest.is_ajax()`` method will be removed.
  90. * Support for the pre-Django 3.1 encoding format of cookies values used by
  91. ``django.contrib.messages.storage.cookie.CookieStorage`` will be removed.
  92. * Support for the pre-Django 3.1 password reset tokens in the admin site (that
  93. use the SHA-1 hashing algorithm) will be removed.
  94. * Support for the pre-Django 3.1 encoding format of sessions will be removed.
  95. * Support for the pre-Django 3.1 ``django.core.signing.Signer`` signatures
  96. (encoded with the SHA-1 algorithm) will be removed.
  97. * Support for the pre-Django 3.1 ``django.core.signing.dumps()`` signatures
  98. (encoded with the SHA-1 algorithm) in ``django.core.signing.loads()`` will be
  99. removed.
  100. * Support for the pre-Django 3.1 user sessions (that use the SHA-1 algorithm)
  101. will be removed.
  102. * The ``get_response`` argument for
  103. ``django.utils.deprecation.MiddlewareMixin.__init__()`` will be required and
  104. won't accept ``None``.
  105. * The ``providing_args`` argument for ``django.dispatch.Signal`` will be
  106. removed.
  107. * The ``length`` argument for ``django.utils.crypto.get_random_string()`` will
  108. be required.
  109. * The ``list`` message for ``ModelMultipleChoiceField`` will be removed.
  110. * Support for passing raw column aliases to ``QuerySet.order_by()`` will be
  111. removed.
  112. * The model ``NullBooleanField`` will be removed. A stub field will remain for
  113. compatibility with historical migrations.
  114. * ``django.conf.urls.url()`` will be removed.
  115. * The model ``django.contrib.postgres.fields.JSONField`` will be removed. A
  116. stub field will remain for compatibility with historical migrations.
  117. * ``django.contrib.postgres.forms.JSONField``,
  118. ``django.contrib.postgres.fields.jsonb.KeyTransform``, and
  119. ``django.contrib.postgres.fields.jsonb.KeyTextTransform`` will be removed.
  120. * The ``{% ifequal %}`` and ``{% ifnotequal %}`` template tags will be removed.
  121. * The ``DEFAULT_HASHING_ALGORITHM`` transitional setting will be removed.
  122. .. _deprecation-removed-in-3.1:
  123. 3.1
  124. ---
  125. See the :ref:`Django 2.2 release notes <deprecated-features-2.2>` for more
  126. details on these changes.
  127. * ``django.utils.timezone.FixedOffset`` will be removed.
  128. * ``django.core.paginator.QuerySetPaginator`` will be removed.
  129. * A model's ``Meta.ordering`` will no longer affect ``GROUP BY`` queries.
  130. * ``django.contrib.postgres.fields.FloatRangeField`` and
  131. ``django.contrib.postgres.forms.FloatRangeField`` will be removed.
  132. * The ``FILE_CHARSET`` setting will be removed.
  133. * ``django.contrib.staticfiles.storage.CachedStaticFilesStorage`` will be
  134. removed.
  135. * ``RemoteUserBackend.configure_user()`` will require ``request`` as the first
  136. positional argument.
  137. * Support for ``SimpleTestCase.allow_database_queries`` and
  138. ``TransactionTestCase.multi_db`` will be removed.
  139. .. _deprecation-removed-in-3.0:
  140. 3.0
  141. ---
  142. See the :ref:`Django 2.0 release notes<deprecated-features-2.0>` for more
  143. details on these changes.
  144. * The ``django.db.backends.postgresql_psycopg2`` module will be removed.
  145. * ``django.shortcuts.render_to_response()`` will be removed.
  146. * The ``DEFAULT_CONTENT_TYPE`` setting will be removed.
  147. * ``HttpRequest.xreadlines()`` will be removed.
  148. * Support for the ``context`` argument of ``Field.from_db_value()`` and
  149. ``Expression.convert_value()`` will be removed.
  150. * The ``field_name`` keyword argument of ``QuerySet.earliest()`` and
  151. ``latest()`` will be removed.
  152. See the :ref:`Django 2.1 release notes <deprecated-features-2.1>` for more
  153. details on these changes.
  154. * ``django.contrib.gis.db.models.functions.ForceRHR`` will be removed.
  155. * ``django.utils.http.cookie_date()`` will be removed.
  156. * The ``staticfiles`` and ``admin_static`` template tag libraries will be
  157. removed.
  158. * ``django.contrib.staticfiles.templatetags.static()`` will be removed.
  159. * The shim to allow ``InlineModelAdmin.has_add_permission()`` to be defined
  160. without an ``obj`` argument will be removed.
  161. .. _deprecation-removed-in-2.1:
  162. 2.1
  163. ---
  164. See the :ref:`Django 1.11 release notes<deprecated-features-1.11>` for more
  165. details on these changes.
  166. * ``contrib.auth.views.login()``, ``logout()``, ``password_change()``,
  167. ``password_change_done()``, ``password_reset()``, ``password_reset_done()``,
  168. ``password_reset_confirm()``, and ``password_reset_complete()`` will be
  169. removed.
  170. * The ``extra_context`` parameter of ``contrib.auth.views.logout_then_login()``
  171. will be removed.
  172. * ``django.test.runner.setup_databases()`` will be removed.
  173. * ``django.utils.translation.string_concat()`` will be removed.
  174. * ``django.core.cache.backends.memcached.PyLibMCCache`` will no longer support
  175. passing ``pylibmc`` behavior settings as top-level attributes of ``OPTIONS``.
  176. * The ``host`` parameter of ``django.utils.http.is_safe_url()`` will be
  177. removed.
  178. * Silencing of exceptions raised while rendering the ``{% include %}`` template
  179. tag will be removed.
  180. * ``DatabaseIntrospection.get_indexes()`` will be removed.
  181. * The ``authenticate()`` method of authentication backends will require
  182. ``request`` as the first positional argument.
  183. * The ``django.db.models.permalink()`` decorator will be removed.
  184. * The ``USE_ETAGS`` setting will be removed. ``CommonMiddleware`` and
  185. ``django.utils.cache.patch_response_headers()`` will no longer set ETags.
  186. * The ``Model._meta.has_auto_field`` attribute will be removed.
  187. * ``url()``'s support for inline flags in regular expression groups (``(?i)``,
  188. ``(?L)``, ``(?m)``, ``(?s)``, and ``(?u)``) will be removed.
  189. * Support for ``Widget.render()`` methods without the ``renderer`` argument
  190. will be removed.
  191. .. _deprecation-removed-in-2.0:
  192. 2.0
  193. ---
  194. See the :ref:`Django 1.9 release notes<deprecated-features-1.9>` for more
  195. details on these changes.
  196. * The ``weak`` argument to ``django.dispatch.signals.Signal.disconnect()`` will
  197. be removed.
  198. * ``django.db.backends.base.BaseDatabaseOperations.check_aggregate_support()``
  199. will be removed.
  200. * The ``django.forms.extras`` package will be removed.
  201. * The ``assignment_tag`` helper will be removed.
  202. * The ``host`` argument to ``assertsRedirects`` will be removed. The
  203. compatibility layer which allows absolute URLs to be considered equal to
  204. relative ones when the path is identical will also be removed.
  205. * ``Field.rel`` will be removed.
  206. * ``Field.remote_field.to`` attribute will be removed.
  207. * The ``on_delete`` argument for ``ForeignKey`` and ``OneToOneField`` will be
  208. required.
  209. * ``django.db.models.fields.add_lazy_relation()`` will be removed.
  210. * When time zone support is enabled, database backends that don't support time
  211. zones won't convert aware datetimes to naive values in UTC anymore when such
  212. values are passed as parameters to SQL queries executed outside of the ORM,
  213. e.g. with ``cursor.execute()``.
  214. * The ``django.contrib.auth.tests.utils.skipIfCustomUser()`` decorator will be
  215. removed.
  216. * The ``GeoManager`` and ``GeoQuerySet`` classes will be removed.
  217. * The ``django.contrib.gis.geoip`` module will be removed.
  218. * The ``supports_recursion`` check for template loaders will be removed from:
  219. * ``django.template.engine.Engine.find_template()``
  220. * ``django.template.loader_tags.ExtendsNode.find_template()``
  221. * ``django.template.loaders.base.Loader.supports_recursion()``
  222. * ``django.template.loaders.cached.Loader.supports_recursion()``
  223. * The ``load_template()`` and ``load_template_sources()`` template loader
  224. methods will be removed.
  225. * The ``template_dirs`` argument for template loaders will be removed:
  226. * ``django.template.loaders.base.Loader.get_template()``
  227. * ``django.template.loaders.cached.Loader.cache_key()``
  228. * ``django.template.loaders.cached.Loader.get_template()``
  229. * ``django.template.loaders.cached.Loader.get_template_sources()``
  230. * ``django.template.loaders.filesystem.Loader.get_template_sources()``
  231. * The ``django.template.loaders.base.Loader.__call__()`` method will be
  232. removed.
  233. * Support for custom error views with a single positional parameter will be
  234. dropped.
  235. * The ``mime_type`` attribute of ``django.utils.feedgenerator.Atom1Feed`` and
  236. ``django.utils.feedgenerator.RssFeed`` will be removed in favor of
  237. ``content_type``.
  238. * The ``app_name`` argument to ``django.conf.urls.include()`` will be
  239. removed.
  240. * Support for passing a 3-tuple as the first argument to ``include()`` will
  241. be removed.
  242. * Support for setting a URL instance namespace without an application
  243. namespace will be removed.
  244. * ``Field._get_val_from_obj()`` will be removed in favor of
  245. ``Field.value_from_object()``.
  246. * ``django.template.loaders.eggs.Loader`` will be removed.
  247. * The ``current_app`` parameter to the ``contrib.auth`` views will be removed.
  248. * The ``callable_obj`` keyword argument to
  249. ``SimpleTestCase.assertRaisesMessage()`` will be removed.
  250. * Support for the ``allow_tags`` attribute on ``ModelAdmin`` methods will be
  251. removed.
  252. * The ``enclosure`` keyword argument to ``SyndicationFeed.add_item()`` will be
  253. removed.
  254. * The ``django.template.loader.LoaderOrigin`` and
  255. ``django.template.base.StringOrigin`` aliases for
  256. ``django.template.base.Origin`` will be removed.
  257. See the :ref:`Django 1.10 release notes <deprecated-features-1.10>` for more
  258. details on these changes.
  259. * The ``makemigrations --exit`` option will be removed.
  260. * Support for direct assignment to a reverse foreign key or many-to-many
  261. relation will be removed.
  262. * The ``get_srid()`` and ``set_srid()`` methods of
  263. ``django.contrib.gis.geos.GEOSGeometry`` will be removed.
  264. * The ``get_x()``, ``set_x()``, ``get_y()``, ``set_y()``, ``get_z()``, and
  265. ``set_z()`` methods of ``django.contrib.gis.geos.Point`` will be removed.
  266. * The ``get_coords()`` and ``set_coords()`` methods of
  267. ``django.contrib.gis.geos.Point`` will be removed.
  268. * The ``cascaded_union`` property of ``django.contrib.gis.geos.MultiPolygon``
  269. will be removed.
  270. * ``django.utils.functional.allow_lazy()`` will be removed.
  271. * The ``shell --plain`` option will be removed.
  272. * The ``django.core.urlresolvers`` module will be removed.
  273. * The model ``CommaSeparatedIntegerField`` will be removed. A stub field will
  274. remain for compatibility with historical migrations.
  275. * Support for the template ``Context.has_key()`` method will be removed.
  276. * Support for the ``django.core.files.storage.Storage.accessed_time()``,
  277. ``created_time()``, and ``modified_time()`` methods will be removed.
  278. * Support for query lookups using the model name when
  279. ``Meta.default_related_name`` is set will be removed.
  280. * The ``__search`` query lookup and the
  281. ``DatabaseOperations.fulltext_search_sql()`` method will be removed.
  282. * The shim for supporting custom related manager classes without a
  283. ``_apply_rel_filters()`` method will be removed.
  284. * Using ``User.is_authenticated()`` and ``User.is_anonymous()`` as methods
  285. will no longer be supported.
  286. * The private attribute ``virtual_fields`` of ``Model._meta`` will be removed.
  287. * The private keyword arguments ``virtual_only`` in
  288. ``Field.contribute_to_class()`` and ``virtual`` in
  289. ``Model._meta.add_field()`` will be removed.
  290. * The ``javascript_catalog()`` and ``json_catalog()`` views will be removed.
  291. * The ``django.contrib.gis.utils.precision_wkt()`` function will be removed.
  292. * In multi-table inheritance, implicit promotion of a ``OneToOneField`` to a
  293. ``parent_link`` will be removed.
  294. * Support for ``Widget._format_value()`` will be removed.
  295. * ``FileField`` methods ``get_directory_name()`` and ``get_filename()`` will be
  296. removed.
  297. * The ``mark_for_escaping()`` function and the classes it uses: ``EscapeData``,
  298. ``EscapeBytes``, ``EscapeText``, ``EscapeString``, and ``EscapeUnicode`` will
  299. be removed.
  300. * The ``escape`` filter will change to use
  301. ``django.utils.html.conditional_escape()``.
  302. * ``Manager.use_for_related_fields`` will be removed.
  303. * Model ``Manager`` inheritance will follow MRO inheritance rules and the
  304. ``Meta.manager_inheritance_from_future`` to opt-in to this behavior will be
  305. removed.
  306. * Support for old-style middleware using ``settings.MIDDLEWARE_CLASSES`` will
  307. be removed.
  308. .. _deprecation-removed-in-1.10:
  309. 1.10
  310. ----
  311. See the :ref:`Django 1.8 release notes<deprecated-features-1.8>` for more
  312. details on these changes.
  313. * Support for calling a ``SQLCompiler`` directly as an alias for calling its
  314. ``quote_name_unless_alias`` method will be removed.
  315. * ``cycle`` and ``firstof`` template tags will be removed from the ``future``
  316. template tag library (used during the 1.6/1.7 deprecation period).
  317. * ``django.conf.urls.patterns()`` will be removed.
  318. * Support for the ``prefix`` argument to
  319. ``django.conf.urls.i18n.i18n_patterns()`` will be removed.
  320. * ``SimpleTestCase.urls`` will be removed.
  321. * Using an incorrect count of unpacked values in the ``for`` template tag
  322. will raise an exception rather than fail silently.
  323. * The ability to reverse URLs using a dotted Python path will be removed.
  324. * The ability to use a dotted Python path for the ``LOGIN_URL`` and
  325. ``LOGIN_REDIRECT_URL`` settings will be removed.
  326. * Support for :py:mod:`optparse` will be dropped for custom management commands
  327. (replaced by :py:mod:`argparse`).
  328. * The class ``django.core.management.NoArgsCommand`` will be removed. Use
  329. :class:`~django.core.management.BaseCommand` instead, which takes no arguments
  330. by default.
  331. * ``django.core.context_processors`` module will be removed.
  332. * ``django.db.models.sql.aggregates`` module will be removed.
  333. * ``django.contrib.gis.db.models.sql.aggregates`` module will be removed.
  334. * The following methods and properties of ``django.db.sql.query.Query`` will
  335. be removed:
  336. * Properties: ``aggregates`` and ``aggregate_select``
  337. * Methods: ``add_aggregate``, ``set_aggregate_mask``, and
  338. ``append_aggregate_mask``.
  339. * ``django.template.resolve_variable`` will be removed.
  340. * The following private APIs will be removed from
  341. :class:`django.db.models.options.Options` (``Model._meta``):
  342. * ``get_field_by_name()``
  343. * ``get_all_field_names()``
  344. * ``get_fields_with_model()``
  345. * ``get_concrete_fields_with_model()``
  346. * ``get_m2m_with_model()``
  347. * ``get_all_related_objects()``
  348. * ``get_all_related_objects_with_model()``
  349. * ``get_all_related_many_to_many_objects()``
  350. * ``get_all_related_m2m_objects_with_model()``
  351. * The ``error_message`` argument of ``django.forms.RegexField`` will be removed.
  352. * The ``unordered_list`` filter will no longer support old style lists.
  353. * Support for string ``view`` arguments to ``url()`` will be removed.
  354. * The backward compatible shim to rename ``django.forms.Form._has_changed()``
  355. to ``has_changed()`` will be removed.
  356. * The ``removetags`` template filter will be removed.
  357. * The ``remove_tags()`` and ``strip_entities()`` functions in
  358. ``django.utils.html`` will be removed.
  359. * The ``is_admin_site`` argument to
  360. ``django.contrib.auth.views.password_reset()`` will be removed.
  361. * ``django.db.models.field.subclassing.SubfieldBase`` will be removed.
  362. * ``django.utils.checksums`` will be removed; its functionality is included
  363. in ``django-localflavor`` 1.1+.
  364. * The ``original_content_type_id`` attribute on
  365. ``django.contrib.admin.helpers.InlineAdminForm`` will be removed.
  366. * The backwards compatibility shim to allow ``FormMixin.get_form()`` to be
  367. defined with no default value for its ``form_class`` argument will be removed.
  368. * The following settings will be removed:
  369. * ``ALLOWED_INCLUDE_ROOTS``
  370. * ``TEMPLATE_CONTEXT_PROCESSORS``
  371. * ``TEMPLATE_DEBUG``
  372. * ``TEMPLATE_DIRS``
  373. * ``TEMPLATE_LOADERS``
  374. * ``TEMPLATE_STRING_IF_INVALID``
  375. * The backwards compatibility alias ``django.template.loader.BaseLoader`` will
  376. be removed.
  377. * Django template objects returned by
  378. :func:`~django.template.loader.get_template` and
  379. :func:`~django.template.loader.select_template` won't accept a
  380. :class:`~django.template.Context` in their
  381. :meth:`~django.template.backends.base.Template.render()` method anymore.
  382. * :doc:`Template response APIs </ref/template-response>` will enforce the use
  383. of :class:`dict` and backend-dependent template objects instead of
  384. :class:`~django.template.Context` and :class:`~django.template.Template`
  385. respectively.
  386. * The ``current_app`` parameter for the following function and classes will be
  387. removed:
  388. * ``django.shortcuts.render()``
  389. * ``django.template.Context()``
  390. * ``django.template.RequestContext()``
  391. * ``django.template.response.TemplateResponse()``
  392. * The ``dictionary`` and ``context_instance`` parameters for the following
  393. functions will be removed:
  394. * ``django.shortcuts.render()``
  395. * ``django.shortcuts.render_to_response()``
  396. * ``django.template.loader.render_to_string()``
  397. * The ``dirs`` parameter for the following functions will be removed:
  398. * ``django.template.loader.get_template()``
  399. * ``django.template.loader.select_template()``
  400. * ``django.shortcuts.render()``
  401. * ``django.shortcuts.render_to_response()``
  402. * Session verification will be enabled regardless of whether or not
  403. ``'django.contrib.auth.middleware.SessionAuthenticationMiddleware'`` is in
  404. ``MIDDLEWARE_CLASSES``.
  405. * Private attribute ``django.db.models.Field.related`` will be removed.
  406. * The ``--list`` option of the ``migrate`` management command will be removed.
  407. * The ``ssi`` template tag will be removed.
  408. * Support for the ``=`` comparison operator in the ``if`` template tag will be
  409. removed.
  410. * The backwards compatibility shims to allow ``Storage.get_available_name()``
  411. and ``Storage.save()`` to be defined without a ``max_length`` argument will
  412. be removed.
  413. * Support for the legacy ``%(<foo>)s`` syntax in ``ModelFormMixin.success_url``
  414. will be removed.
  415. * ``GeoQuerySet`` aggregate methods ``collect()``, ``extent()``, ``extent3d()``,
  416. ``make_line()``, and ``unionagg()`` will be removed.
  417. * Ability to specify ``ContentType.name`` when creating a content type instance
  418. will be removed.
  419. * Support for the old signature of ``allow_migrate`` will be removed. It changed
  420. from ``allow_migrate(self, db, model)`` to
  421. ``allow_migrate(self, db, app_label, model_name=None, **hints)``.
  422. * Support for the syntax of ``{% cycle %}`` that uses comma-separated arguments
  423. will be removed.
  424. * The warning that :class:`~django.core.signing.Signer` issues when given an
  425. invalid separator will become an exception.
  426. .. _deprecation-removed-in-1.9:
  427. 1.9
  428. ---
  429. See the :ref:`Django 1.7 release notes<deprecated-features-1.7>` for more
  430. details on these changes.
  431. * ``django.utils.dictconfig`` will be removed.
  432. * ``django.utils.importlib`` will be removed.
  433. * ``django.utils.tzinfo`` will be removed.
  434. * ``django.utils.unittest`` will be removed.
  435. * The ``syncdb`` command will be removed.
  436. * ``django.db.models.signals.pre_syncdb`` and
  437. ``django.db.models.signals.post_syncdb`` will be removed.
  438. * ``allow_syncdb`` on database routers will no longer automatically become
  439. ``allow_migrate``.
  440. * Automatic syncing of apps without migrations will be removed. Migrations will
  441. become compulsory for all apps unless you pass the ``--run-syncdb`` option to
  442. ``migrate``.
  443. * The SQL management commands for apps without migrations, ``sql``, ``sqlall``,
  444. ``sqlclear``, ``sqldropindexes``, and ``sqlindexes``, will be removed.
  445. * Support for automatic loading of ``initial_data`` fixtures and initial SQL
  446. data will be removed.
  447. * All models will need to be defined inside an installed application or
  448. declare an explicit :attr:`~django.db.models.Options.app_label`.
  449. Furthermore, it won't be possible to import them before their application
  450. is loaded. In particular, it won't be possible to import models inside
  451. the root package of their application.
  452. * The model and form ``IPAddressField`` will be removed. A stub field will
  453. remain for compatibility with historical migrations.
  454. * ``AppCommand.handle_app()`` will no longer be supported.
  455. * ``RequestSite`` and ``get_current_site()`` will no longer be importable from
  456. ``django.contrib.sites.models``.
  457. * FastCGI support via the ``runfcgi`` management command will be
  458. removed. Please deploy your project using WSGI.
  459. * ``django.utils.datastructures.SortedDict`` will be removed. Use
  460. :class:`collections.OrderedDict` from the Python standard library instead.
  461. * ``ModelAdmin.declared_fieldsets`` will be removed.
  462. * Instances of ``util.py`` in the Django codebase have been renamed to
  463. ``utils.py`` in an effort to unify all util and utils references.
  464. The modules that provided backwards compatibility will be removed:
  465. * ``django.contrib.admin.util``
  466. * ``django.contrib.gis.db.backends.util``
  467. * ``django.db.backends.util``
  468. * ``django.forms.util``
  469. * ``ModelAdmin.get_formsets`` will be removed.
  470. * The backward compatibility shim introduced to rename the
  471. ``BaseMemcachedCache._get_memcache_timeout()`` method to
  472. ``get_backend_timeout()`` will be removed.
  473. * The ``--natural`` and ``-n`` options for :djadmin:`dumpdata` will be removed.
  474. * The ``use_natural_keys`` argument for ``serializers.serialize()`` will be
  475. removed.
  476. * Private API ``django.forms.forms.get_declared_fields()`` will be removed.
  477. * The ability to use a ``SplitDateTimeWidget`` with ``DateTimeField`` will be
  478. removed.
  479. * The ``WSGIRequest.REQUEST`` property will be removed.
  480. * The class ``django.utils.datastructures.MergeDict`` will be removed.
  481. * The ``zh-cn`` and ``zh-tw`` language codes will be removed and have been
  482. replaced by the ``zh-hans`` and ``zh-hant`` language code respectively.
  483. * The internal ``django.utils.functional.memoize`` will be removed.
  484. * ``django.core.cache.get_cache`` will be removed. Add suitable entries
  485. to :setting:`CACHES` and use :data:`django.core.cache.caches` instead.
  486. * ``django.db.models.loading`` will be removed.
  487. * Passing callable arguments to querysets will no longer be possible.
  488. * ``BaseCommand.requires_model_validation`` will be removed in favor of
  489. ``requires_system_checks``. Admin validators will be replaced by admin
  490. checks.
  491. * The ``ModelAdmin.validator_class`` and ``default_validator_class`` attributes
  492. will be removed.
  493. * ``ModelAdmin.validate()`` will be removed.
  494. * ``django.db.backends.DatabaseValidation.validate_field`` will be removed in
  495. favor of the ``check_field`` method.
  496. * The ``validate`` management command will be removed.
  497. * ``django.utils.module_loading.import_by_path`` will be removed in favor of
  498. ``django.utils.module_loading.import_string``.
  499. * ``ssi`` and ``url`` template tags will be removed from the ``future`` template
  500. tag library (used during the 1.3/1.4 deprecation period).
  501. * ``django.utils.text.javascript_quote`` will be removed.
  502. * Database test settings as independent entries in the database settings,
  503. prefixed by ``TEST_``, will no longer be supported.
  504. * The ``cache_choices`` option to :class:`~django.forms.ModelChoiceField` and
  505. :class:`~django.forms.ModelMultipleChoiceField` will be removed.
  506. * The default value of the
  507. :attr:`RedirectView.permanent <django.views.generic.base.RedirectView.permanent>`
  508. attribute will change from ``True`` to ``False``.
  509. * ``django.contrib.sitemaps.FlatPageSitemap`` will be removed in favor of
  510. ``django.contrib.flatpages.sitemaps.FlatPageSitemap``.
  511. * Private API ``django.test.utils.TestTemplateLoader`` will be removed.
  512. * The ``django.contrib.contenttypes.generic`` module will be removed.
  513. * Private APIs ``django.db.models.sql.where.WhereNode.make_atom()`` and
  514. ``django.db.models.sql.where.Constraint`` will be removed.
  515. .. _deprecation-removed-in-1.8:
  516. 1.8
  517. ---
  518. See the :ref:`Django 1.6 release notes<deprecated-features-1.6>` for more
  519. details on these changes.
  520. * ``django.contrib.comments`` will be removed.
  521. * The following transaction management APIs will be removed:
  522. - ``TransactionMiddleware``,
  523. - the decorators and context managers ``autocommit``, ``commit_on_success``,
  524. and ``commit_manually``, defined in ``django.db.transaction``,
  525. - the functions ``commit_unless_managed`` and ``rollback_unless_managed``,
  526. also defined in ``django.db.transaction``,
  527. - the ``TRANSACTIONS_MANAGED`` setting.
  528. * The :ttag:`cycle` and :ttag:`firstof` template tags will auto-escape their
  529. arguments. In 1.6 and 1.7, this behavior is provided by the version of these
  530. tags in the ``future`` template tag library.
  531. * The ``SEND_BROKEN_LINK_EMAILS`` setting will be removed. Add the
  532. :class:`django.middleware.common.BrokenLinkEmailsMiddleware` middleware to
  533. your ``MIDDLEWARE_CLASSES`` setting instead.
  534. * ``django.middleware.doc.XViewMiddleware`` will be removed. Use
  535. ``django.contrib.admindocs.middleware.XViewMiddleware`` instead.
  536. * ``Model._meta.module_name`` was renamed to ``model_name``.
  537. * Remove the backward compatible shims introduced to rename ``get_query_set``
  538. and similar queryset methods. This affects the following classes:
  539. ``BaseModelAdmin``, ``ChangeList``, ``BaseCommentNode``,
  540. ``GenericForeignKey``, ``Manager``, ``SingleRelatedObjectDescriptor`` and
  541. ``ReverseSingleRelatedObjectDescriptor``.
  542. * Remove the backward compatible shims introduced to rename the attributes
  543. ``ChangeList.root_query_set`` and ``ChangeList.query_set``.
  544. * ``django.views.defaults.shortcut`` will be removed, as part of the
  545. goal of removing all ``django.contrib`` references from the core
  546. Django codebase. Instead use
  547. ``django.contrib.contenttypes.views.shortcut``. ``django.conf.urls.shortcut``
  548. will also be removed.
  549. * Support for the Python Imaging Library (PIL) module will be removed, as it
  550. no longer appears to be actively maintained & does not work on Python 3.
  551. * The following private APIs will be removed:
  552. - ``django.db.backend``
  553. - ``django.db.close_connection()``
  554. - ``django.db.backends.creation.BaseDatabaseCreation.set_autocommit()``
  555. - ``django.db.transaction.is_managed()``
  556. - ``django.db.transaction.managed()``
  557. * ``django.forms.widgets.RadioInput`` will be removed in favor of
  558. ``django.forms.widgets.RadioChoiceInput``.
  559. * The module ``django.test.simple`` and the class
  560. ``django.test.simple.DjangoTestSuiteRunner`` will be removed. Instead use
  561. ``django.test.runner.DiscoverRunner``.
  562. * The module ``django.test._doctest`` will be removed. Instead use the doctest
  563. module from the Python standard library.
  564. * The ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting will be removed.
  565. * Usage of the hard-coded *Hold down "Control", or "Command" on a Mac, to select
  566. more than one.* string to override or append to user-provided ``help_text`` in
  567. forms for ManyToMany model fields will not be performed by Django anymore
  568. either at the model or forms layer.
  569. * The ``Model._meta.get_(add|change|delete)_permission`` methods will
  570. be removed.
  571. * The session key ``django_language`` will no longer be read for backwards
  572. compatibility.
  573. * Geographic Sitemaps will be removed
  574. (``django.contrib.gis.sitemaps.views.index`` and
  575. ``django.contrib.gis.sitemaps.views.sitemap``).
  576. * ``django.utils.html.fix_ampersands``, the ``fix_ampersands`` template filter and
  577. ``django.utils.html.clean_html`` will be removed following an accelerated deprecation.
  578. .. _deprecation-removed-in-1.7:
  579. 1.7
  580. ---
  581. See the :ref:`Django 1.5 release notes<deprecated-features-1.5>` for more
  582. details on these changes.
  583. * The module ``django.utils.simplejson`` will be removed. The standard library
  584. provides :mod:`json` which should be used instead.
  585. * The function ``django.utils.itercompat.product`` will be removed. The Python
  586. builtin version should be used instead.
  587. * Auto-correction of INSTALLED_APPS and TEMPLATE_DIRS settings when they are
  588. specified as a plain string instead of a tuple will be removed and raise an
  589. exception.
  590. * The ``mimetype`` argument to the ``__init__`` methods of
  591. :class:`~django.http.HttpResponse`,
  592. :class:`~django.template.response.SimpleTemplateResponse`, and
  593. :class:`~django.template.response.TemplateResponse`, will be removed.
  594. ``content_type`` should be used instead. This also applies to the
  595. ``render_to_response()`` shortcut and the sitemap views,
  596. :func:`~django.contrib.sitemaps.views.index` and
  597. :func:`~django.contrib.sitemaps.views.sitemap`.
  598. * When :class:`~django.http.HttpResponse` is instantiated with an iterator,
  599. or when :attr:`~django.http.HttpResponse.content` is set to an iterator,
  600. that iterator will be immediately consumed.
  601. * The ``AUTH_PROFILE_MODULE`` setting, and the ``get_profile()`` method on
  602. the User model, will be removed.
  603. * The ``cleanup`` management command will be removed. It's replaced by
  604. ``clearsessions``.
  605. * The ``daily_cleanup.py`` script will be removed.
  606. * The ``depth`` keyword argument will be removed from
  607. :meth:`~django.db.models.query.QuerySet.select_related`.
  608. * The undocumented ``get_warnings_state()``/``restore_warnings_state()``
  609. functions from :mod:`django.test.utils` and the ``save_warnings_state()``/
  610. ``restore_warnings_state()``
  611. :ref:`django.test.*TestCase <django-testcase-subclasses>` methods are
  612. deprecated. Use the :class:`warnings.catch_warnings` context manager
  613. available starting with Python 2.6 instead.
  614. * The undocumented ``check_for_test_cookie`` method in
  615. :class:`~django.contrib.auth.forms.AuthenticationForm` will be removed
  616. following an accelerated deprecation. Users subclassing this form should
  617. remove calls to this method, and instead ensure that their auth related views
  618. are CSRF protected, which ensures that cookies are enabled.
  619. * The version of ``django.contrib.auth.views.password_reset_confirm()`` that
  620. supports base36 encoded user IDs
  621. (``django.contrib.auth.views.password_reset_confirm_uidb36``) will be
  622. removed. If your site has been running Django 1.6 for more than
  623. ``PASSWORD_RESET_TIMEOUT_DAYS``, this change will have no effect. If not,
  624. then any password reset links generated before you upgrade to Django 1.7
  625. won't work after the upgrade.
  626. * The ``django.utils.encoding.StrAndUnicode`` mix-in will be removed.
  627. .. _deprecation-removed-in-1.6:
  628. 1.6
  629. ---
  630. See the :ref:`Django 1.4 release notes<deprecated-features-1.4>` for more
  631. details on these changes.
  632. * ``django.contrib.databrowse`` will be removed.
  633. * ``django.contrib.localflavor`` will be removed following an accelerated
  634. deprecation.
  635. * ``django.contrib.markup`` will be removed following an accelerated
  636. deprecation.
  637. * The compatibility modules ``django.utils.copycompat`` and
  638. ``django.utils.hashcompat`` as well as the functions
  639. ``django.utils.itercompat.all`` and ``django.utils.itercompat.any`` will
  640. be removed. The Python builtin versions should be used instead.
  641. * The ``csrf_response_exempt`` and ``csrf_view_exempt`` decorators will
  642. be removed. Since 1.4 ``csrf_response_exempt`` has been a no-op (it
  643. returns the same function), and ``csrf_view_exempt`` has been a
  644. synonym for ``django.views.decorators.csrf.csrf_exempt``, which should
  645. be used to replace it.
  646. * The ``django.core.cache.backends.memcached.CacheClass`` backend
  647. was split into two in Django 1.3 in order to introduce support for
  648. PyLibMC. The historical ``CacheClass`` will be removed in favor of
  649. ``django.core.cache.backends.memcached.MemcachedCache``.
  650. * The UK-prefixed objects of ``django.contrib.localflavor.uk`` will only
  651. be accessible through their GB-prefixed names (GB is the correct
  652. ISO 3166 code for United Kingdom).
  653. * The ``IGNORABLE_404_STARTS`` and ``IGNORABLE_404_ENDS`` settings have been
  654. superseded by :setting:`IGNORABLE_404_URLS` in the 1.4 release. They will be
  655. removed.
  656. * The form wizard has been refactored to use class-based views with pluggable
  657. backends in 1.4. The previous implementation will be removed.
  658. * Legacy ways of calling
  659. :func:`~django.views.decorators.cache.cache_page` will be removed.
  660. * The backward-compatibility shim to automatically add a debug-false
  661. filter to the ``'mail_admins'`` logging handler will be removed. The
  662. :setting:`LOGGING` setting should include this filter explicitly if
  663. it is desired.
  664. * The builtin truncation functions ``django.utils.text.truncate_words()``
  665. and ``django.utils.text.truncate_html_words()`` will be removed in
  666. favor of the ``django.utils.text.Truncator`` class.
  667. * The ``django.contrib.gis.geoip.GeoIP`` class was moved to
  668. ``django.contrib.gis.geoip`` in 1.4 -- the shortcut in
  669. ``django.contrib.gis.utils`` will be removed.
  670. * ``django.conf.urls.defaults`` will be removed. The functions
  671. ``include()``, ``patterns()``, and ``url()``, plus
  672. :data:`~django.conf.urls.handler404` and :data:`~django.conf.urls.handler500`
  673. are now available through ``django.conf.urls``.
  674. * The functions ``setup_environ()`` and ``execute_manager()`` will be removed
  675. from :mod:`django.core.management`. This also means that the old (pre-1.4)
  676. style of :file:`manage.py` file will no longer work.
  677. * Setting the ``is_safe`` and ``needs_autoescape`` flags as attributes of
  678. template filter functions will no longer be supported.
  679. * The attribute ``HttpRequest.raw_post_data`` was renamed to ``HttpRequest.body``
  680. in 1.4. The backward compatibility will be removed --
  681. ``HttpRequest.raw_post_data`` will no longer work.
  682. * The value for the ``post_url_continue`` parameter in
  683. ``ModelAdmin.response_add()`` will have to be either ``None`` (to redirect
  684. to the newly created object's edit page) or a pre-formatted url. String
  685. formats, such as the previous default ``'../%s/'``, will not be accepted any
  686. more.
  687. .. _deprecation-removed-in-1.5:
  688. 1.5
  689. ---
  690. See the :ref:`Django 1.3 release notes<deprecated-features-1.3>` for more
  691. details on these changes.
  692. * Starting Django without a :setting:`SECRET_KEY` will result in an exception
  693. rather than a ``DeprecationWarning``. (This is accelerated from the usual
  694. deprecation path; see the :doc:`Django 1.4 release notes</releases/1.4>`.)
  695. * The ``mod_python`` request handler will be removed. The ``mod_wsgi``
  696. handler should be used instead.
  697. * The ``template`` attribute on ``django.test.client.Response``
  698. objects returned by the :ref:`test client <test-client>` will be removed.
  699. The :attr:`~django.test.Response.templates` attribute should be
  700. used instead.
  701. * The ``django.test.simple.DjangoTestRunner`` will be removed.
  702. Instead use a ``unittest``-native class. The features of the
  703. ``django.test.simple.DjangoTestRunner`` (including fail-fast and
  704. Ctrl-C test termination) can be provided by :class:`unittest.TextTestRunner`.
  705. * The undocumented function
  706. ``django.contrib.formtools.utils.security_hash`` will be removed,
  707. instead use ``django.contrib.formtools.utils.form_hmac``
  708. * The function-based generic view modules will be removed in favor of their
  709. class-based equivalents, outlined :doc:`here
  710. </topics/class-based-views/index>`.
  711. * The ``django.core.servers.basehttp.AdminMediaHandler`` will be
  712. removed. In its place use
  713. ``django.contrib.staticfiles.handlers.StaticFilesHandler``.
  714. * The template tags library ``adminmedia`` and the template tag ``{%
  715. admin_media_prefix %}`` will be removed in favor of the generic static files
  716. handling. (This is faster than the usual deprecation path; see the
  717. :doc:`Django 1.4 release notes</releases/1.4>`.)
  718. * The ``url`` and ``ssi`` template tags will be modified so that the first
  719. argument to each tag is a template variable, not an implied string. In 1.4,
  720. this behavior is provided by a version of the tag in the ``future`` template
  721. tag library.
  722. * The ``reset`` and ``sqlreset`` management commands will be removed.
  723. * Authentication backends will need to support an inactive user
  724. being passed to all methods dealing with permissions.
  725. The ``supports_inactive_user`` attribute will no longer be checked
  726. and can be removed from custom backends.
  727. * :meth:`~django.contrib.gis.geos.GEOSGeometry.transform` will raise
  728. a :class:`~django.contrib.gis.geos.GEOSException` when called
  729. on a geometry with no SRID value.
  730. * ``django.http.CompatCookie`` will be removed in favor of
  731. ``django.http.SimpleCookie``.
  732. * ``django.core.context_processors.PermWrapper`` and
  733. ``django.core.context_processors.PermLookupDict`` will be removed in
  734. favor of the corresponding
  735. ``django.contrib.auth.context_processors.PermWrapper`` and
  736. ``django.contrib.auth.context_processors.PermLookupDict``, respectively.
  737. * The :setting:`MEDIA_URL` or :setting:`STATIC_URL` settings will be
  738. required to end with a trailing slash to ensure there is a consistent
  739. way to combine paths in templates.
  740. * ``django.db.models.fields.URLField.verify_exists`` will be removed. The
  741. feature was deprecated in 1.3.1 due to intractable security and
  742. performance issues and will follow a slightly accelerated deprecation
  743. timeframe.
  744. * Translations located under the so-called *project path* will be ignored during
  745. the translation building process performed at runtime. The
  746. :setting:`LOCALE_PATHS` setting can be used for the same task by including the
  747. filesystem path to a ``locale`` directory containing non-app-specific
  748. translations in its value.
  749. * The Markup contrib app will no longer support versions of Python-Markdown
  750. library earlier than 2.1. An accelerated timeline was used as this was
  751. a security related deprecation.
  752. * The ``CACHE_BACKEND`` setting will be removed. The cache backend(s) should be
  753. specified in the :setting:`CACHES` setting.
  754. .. _deprecation-removed-in-1.4:
  755. 1.4
  756. ---
  757. See the :ref:`Django 1.2 release notes<deprecated-features-1.2>` for more
  758. details on these changes.
  759. * ``CsrfResponseMiddleware`` and ``CsrfMiddleware`` will be removed. Use
  760. the ``{% csrf_token %}`` template tag inside forms to enable CSRF
  761. protection. ``CsrfViewMiddleware`` remains and is enabled by default.
  762. * The old imports for CSRF functionality (``django.contrib.csrf.*``),
  763. which moved to core in 1.2, will be removed.
  764. * The ``django.contrib.gis.db.backend`` module will be removed in favor
  765. of the specific backends.
  766. * ``SMTPConnection`` will be removed in favor of a generic email backend API.
  767. * The many to many SQL generation functions on the database backends
  768. will be removed.
  769. * The ability to use the ``DATABASE_*`` family of top-level settings to
  770. define database connections will be removed.
  771. * The ability to use shorthand notation to specify a database backend
  772. (i.e., ``sqlite3`` instead of ``django.db.backends.sqlite3``) will be
  773. removed.
  774. * The ``get_db_prep_save``, ``get_db_prep_value`` and
  775. ``get_db_prep_lookup`` methods will have to support multiple databases.
  776. * The ``Message`` model (in ``django.contrib.auth``), its related
  777. manager in the ``User`` model (``user.message_set``), and the
  778. associated methods (``user.message_set.create()`` and
  779. ``user.get_and_delete_messages()``), will be removed. The
  780. :doc:`messages framework </ref/contrib/messages>` should be used
  781. instead. The related ``messages`` variable returned by the
  782. auth context processor will also be removed. Note that this
  783. means that the admin application will depend on the messages
  784. context processor.
  785. * Authentication backends will need to support the ``obj`` parameter for
  786. permission checking. The ``supports_object_permissions`` attribute
  787. will no longer be checked and can be removed from custom backends.
  788. * Authentication backends will need to support the ``AnonymousUser`` class
  789. being passed to all methods dealing with permissions. The
  790. ``supports_anonymous_user`` variable will no longer be checked and can be
  791. removed from custom backends.
  792. * The ability to specify a callable template loader rather than a
  793. ``Loader`` class will be removed, as will the ``load_template_source``
  794. functions that are included with the built in template loaders for
  795. backwards compatibility.
  796. * ``django.utils.translation.get_date_formats()`` and
  797. ``django.utils.translation.get_partial_date_formats()``. These functions
  798. will be removed; use the locale-aware
  799. ``django.utils.formats.get_format()`` to get the appropriate formats.
  800. * In ``django.forms.fields``, the constants: ``DEFAULT_DATE_INPUT_FORMATS``,
  801. ``DEFAULT_TIME_INPUT_FORMATS`` and
  802. ``DEFAULT_DATETIME_INPUT_FORMATS`` will be removed. Use
  803. ``django.utils.formats.get_format()`` to get the appropriate
  804. formats.
  805. * The ability to use a function-based test runner will be removed,
  806. along with the ``django.test.simple.run_tests()`` test runner.
  807. * The ``views.feed()`` view and ``feeds.Feed`` class in
  808. ``django.contrib.syndication`` will be removed. The class-based view
  809. ``views.Feed`` should be used instead.
  810. * ``django.core.context_processors.auth``. This release will
  811. remove the old method in favor of the new method in
  812. ``django.contrib.auth.context_processors.auth``.
  813. * The ``postgresql`` database backend will be removed, use the
  814. ``postgresql_psycopg2`` backend instead.
  815. * The ``no`` language code will be removed and has been replaced by the
  816. ``nb`` language code.
  817. * Authentication backends will need to define the boolean attribute
  818. ``supports_inactive_user`` until version 1.5 when it will be assumed that
  819. all backends will handle inactive users.
  820. * ``django.db.models.fields.XMLField`` will be removed. This was
  821. deprecated as part of the 1.3 release. An accelerated deprecation
  822. schedule has been used because the field hasn't performed any role
  823. beyond that of a simple ``TextField`` since the removal of ``oldforms``.
  824. All uses of ``XMLField`` can be replaced with ``TextField``.
  825. * The undocumented ``mixin`` parameter to the ``open()`` method of
  826. ``django.core.files.storage.Storage`` (and subclasses) will be removed.
  827. .. _deprecation-removed-in-1.3:
  828. 1.3
  829. ---
  830. See the :ref:`Django 1.1 release notes<deprecated-features-1.1>` for more
  831. details on these changes.
  832. * ``AdminSite.root()``. This method of hooking up the admin URLs will be
  833. removed in favor of including ``admin.site.urls``.
  834. * Authentication backends need to define the boolean attributes
  835. ``supports_object_permissions`` and ``supports_anonymous_user`` until
  836. version 1.4, at which point it will be assumed that all backends will
  837. support these options.