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