deprecation.txt 47 KB

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