1.7.2.txt 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. ==========================
  2. Django 1.7.2 release notes
  3. ==========================
  4. *January 2, 2015*
  5. Django 1.7.2 fixes several bugs in 1.7.1.
  6. Additionally, Django's vendored version of six, :mod:`django.utils.six`, has
  7. been upgraded to the latest release (1.9.0).
  8. Bugfixes
  9. ========
  10. * Fixed migration's renaming of auto-created many-to-many tables when changing
  11. :attr:`Meta.db_table <django.db.models.Options.db_table>` (:ticket:`23630`).
  12. * Fixed a migration crash when adding an explicit ``id`` field to a model on
  13. SQLite (:ticket:`23702`).
  14. * Added a warning for duplicate models when a module is reloaded. Previously a
  15. ``RuntimeError`` was raised every time two models clashed in the app registry.
  16. (:ticket:`23621`).
  17. * Prevented :djadmin:`flush` from loading initial data for migrated apps
  18. (:ticket:`23699`).
  19. * Fixed a :djadmin:`makemessages` regression in 1.7.1 when
  20. :setting:`STATIC_ROOT` has the default ``None`` value (:ticket:`23717`).
  21. * Added GeoDjango compatibility with mysqlclient database driver.
  22. * Fixed MySQL 5.6+ crash with ``GeometryField``\s in migrations
  23. (:ticket:`23719`).
  24. * Fixed a migration crash when removing a field that is referenced in
  25. ``AlterIndexTogether`` or ``AlterUniqueTogether`` (:ticket:`23614`).
  26. * Updated the first day of the week in the Ukrainian locale to Monday.
  27. * Added support for transactional spatial metadata initialization on
  28. SpatiaLite 4.1+ (:ticket:`23152`).
  29. * Fixed a migration crash that prevented changing a nullable field with a
  30. default to non-nullable with the same default (:ticket:`23738`).
  31. * Fixed a migration crash when adding ``GeometryField``\s with ``blank=True``
  32. on PostGIS (:ticket:`23731`).
  33. * Allowed usage of ``DateTimeField()`` as ``Transform.output_field``
  34. (:ticket:`23420`).
  35. * Fixed a migration serializing bug involving ``float("nan")`` and
  36. ``float("inf")`` (:ticket:`23770`).
  37. * Fixed a regression where custom form fields having a ``queryset`` attribute
  38. but no ``limit_choices_to`` could not be used in a
  39. :class:`~django.forms.ModelForm` (:ticket:`23795`).
  40. * Fixed a custom field type validation error with MySQL backend when
  41. ``db_type`` returned ``None`` (:ticket:`23761`).
  42. * Fixed a migration crash when a field is renamed that is part of an
  43. ``index_together`` (:ticket:`23859`).
  44. * Fixed :djadmin:`squashmigrations` to respect the ``--no-optimize`` parameter
  45. (:ticket:`23799`).
  46. * Made :class:`~django.db.migrations.operations.RenameModel` reversible
  47. (:ticket:`22248`)
  48. * Avoided unnecessary rollbacks of migrations from other apps when migrating
  49. backwards (:ticket:`23410`).
  50. * Fixed a rare query error when using deeply nested subqueries
  51. (:ticket:`23605`).
  52. * Fixed a crash in migrations when deleting a field that is part of a
  53. ``index/unique_together`` constraint (:ticket:`23794`).
  54. * Fixed ``django.core.files.File.__repr__()`` when the file's ``name`` contains
  55. Unicode characters (:ticket:`23888`).
  56. * Added missing context to the admin's ``delete_selected`` view that prevented
  57. custom site header, etc. from appearing (:ticket:`23898`).
  58. * Fixed a regression with dynamically generated inlines and allowed field
  59. references in the admin (:ticket:`23754`).
  60. * Fixed an infinite loop bug for certain cyclic migration dependencies, and made
  61. the error message for cyclic dependencies much more helpful.
  62. * Added missing ``index_together`` handling for SQLite (:ticket:`23880`).
  63. * Fixed a crash when ``RunSQL`` SQL content was collected by the schema editor,
  64. typically when using ``sqlmigrate`` (:ticket:`23909`).
  65. * Fixed a regression in ``contrib.admin`` add/change views which caused some
  66. ``ModelAdmin`` methods to receive the incorrect ``obj`` value
  67. (:ticket:`23934`).
  68. * Fixed ``runserver`` crash when socket error message contained Unicode
  69. characters (:ticket:`23946`).
  70. * Fixed serialization of ``type`` when adding a ``deconstruct()`` method
  71. (:ticket:`23950`).
  72. * Prevented the
  73. ``django.contrib.auth.middleware.SessionAuthenticationMiddleware`` from
  74. setting a ``"Vary: Cookie"`` header on all responses (:ticket:`23939`).
  75. * Fixed a crash when adding ``blank=True`` to ``TextField()`` on MySQL
  76. (:ticket:`23920`).
  77. * Fixed index creation by the migration infrastructure, particularly when
  78. dealing with PostgreSQL specific ``{text|varchar}_pattern_ops`` indexes
  79. (:ticket:`23954`).
  80. * Fixed bug in ``makemigrations`` that created broken migration files when
  81. dealing with multiple table inheritance and inheriting from more than one
  82. model (:ticket:`23956`).
  83. * Fixed a crash when a ``MultiValueField`` has invalid data (:ticket:`23674`).
  84. * Fixed a crash in the admin when using "Save as new" and also deleting a
  85. related inline (:ticket:`23857`).
  86. * Always converted ``related_name`` to text (unicode), since that is required
  87. on Python 3 for interpolation. Removed conversion of ``related_name`` to text
  88. in migration deconstruction (:ticket:`23455` and :ticket:`23982`).
  89. * Enlarged the sizes of tablespaces which are created by default for testing
  90. on Oracle (the main tablespace was increased from 200M to 300M and the
  91. temporary tablespace from 100M to 150M). This was required to accommodate
  92. growth in Django's own test suite (:ticket:`23969`).
  93. * Fixed ``timesince`` filter translations in Korean (:ticket:`23989`).
  94. * Fixed the SQLite ``SchemaEditor`` to properly add defaults in the absence of
  95. a user specified ``default``. For example, a ``CharField`` with ``blank=True``
  96. didn't set existing rows to an empty string which resulted in a crash when
  97. adding the ``NOT NULL`` constraint (:ticket:`23987`).
  98. * ``makemigrations`` no longer prompts for a default value when adding
  99. ``TextField()`` or ``CharField()`` without a ``default`` (:ticket:`23405`).
  100. * Fixed a migration crash when adding ``order_with_respect_to`` to a table
  101. with existing rows (:ticket:`23983`).
  102. * Restored the ``pre_migrate`` signal if all apps have migrations
  103. (:ticket:`23975`).
  104. * Made admin system checks run for custom ``AdminSite``\s (:ticket:`23497`).
  105. * Ensured the app registry is fully populated when unpickling models. When an
  106. external script (like a queueing infrastructure) reloads pickled models, it
  107. could crash with an ``AppRegistryNotReady`` exception (:ticket:`24007`).
  108. * Added quoting to field indexes in the SQL generated by migrations to prevent
  109. a crash when the index name requires it (:ticket:`#24015`).
  110. * Added ``datetime.time`` support to migrations questioner (:ticket:`23998`).
  111. * Fixed admindocs crash on apps installed as eggs (:ticket:`23525`).
  112. * Changed migrations autodetector to generate an ``AlterModelOptions`` operation
  113. instead of ``DeleteModel`` and ``CreateModel`` operations when changing
  114. ``Meta.managed``. This prevents data loss when changing ``managed`` from
  115. ``False`` to ``True`` and vice versa (:ticket:`24037`).
  116. * Enabled the ``sqlsequencereset`` command on apps with migrations
  117. (:ticket:`24054`).
  118. * Added tablespace SQL to apps with migrations (:ticket:`24051`).
  119. * Corrected ``contrib.sites`` default site creation in a multiple database
  120. setup (:ticket:`24000`).
  121. * Restored support for objects that aren't :class:`str` or :class:`bytes` in
  122. :func:`~django.utils.safestring.mark_for_escaping` on Python 3.
  123. * Supported strings escaped by third-party libraries with the ``__html__``
  124. convention in the template engine (:ticket:`23831`).
  125. * Prevented extraneous ``DROP DEFAULT`` SQL in migrations (:ticket:`23581`).
  126. * Restored the ability to use more than five levels of subqueries
  127. (:ticket:`23758`).
  128. * Fixed crash when ``ValidationError`` is initialized with a ``ValidationError``
  129. that is initialized with a dictionary (:ticket:`24008`).
  130. * Prevented a crash on apps without migrations when running ``migrate --list``
  131. (:ticket:`23366`).