deprecation.txt 47 KB

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