Debian Codegraph @

docs/releases/1.7.2.txt

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