deprecation.txt 49 KB

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