Skip to content

Commit c858dfa

Browse files
committed
Minor reordering of sections in 0.96 release notes
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 609a42e commit c858dfa

File tree

1 file changed

+107
-107
lines changed

1 file changed

+107
-107
lines changed

docs/release_notes_0.96.txt

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,113 @@ next official release; then you'll be able to upgrade in one step
1717
instead of needing to make incremental changes to keep up with the
1818
development version of Django.
1919

20+
Backwards-incompatible changes
21+
==============================
22+
23+
The following changes may require you to update your code when you switch from
24+
0.95 to 0.96:
25+
26+
`MySQLdb` version requirement
27+
-----------------------------
28+
29+
Due to a bug in older versions of the `MySQLdb` Python module (which
30+
Django uses to connect to MySQL databases), Django's MySQL backend now
31+
requires version 1.2.1p2 or higher of `MySQLdb`, and will raise
32+
exceptions if you attempt to use an older version.
33+
34+
If you're currently unable to upgrade your copy of `MySQLdb` to meet
35+
this requirement, a separate, backwards-compatible backend, called
36+
"mysql_old", has been added to Django. To use this backend, change
37+
the ``DATABASE_ENGINE`` setting in your Django settings file from
38+
this::
39+
40+
DATABASE_ENGINE = "mysql"
41+
42+
to this::
43+
44+
DATABASE_ENGINE = "mysql_old"
45+
46+
However, we strongly encourage MySQL users to upgrade to a more recent
47+
version of `MySQLdb` as soon as possible, The "mysql_old" backend is
48+
provided only to ease this transition, and is considered deprecated;
49+
aside from any necessary security fixes, it will not be actively
50+
maintained, and it will be removed in a future release of Django.
51+
52+
Also, note that some features, like the new ``DATABASE_OPTIONS``
53+
setting (see the `databases documentation`_ for details), are only
54+
available on the "mysql" backend, and will not be made available for
55+
"mysql_old".
56+
57+
.. _databases: ../databases/
58+
59+
Database constraint names changed
60+
---------------------------------
61+
62+
The format of the constraint names Django generates for foreign key
63+
references have changed slightly. These names are generally only used
64+
when it is not possible to put the reference directly on the affected
65+
column, so they is not always visible.
66+
67+
The effect of this change is that running ``manage.py reset`` and
68+
similar commands against an existing database may generate SQL with
69+
the new form of constraint name, while the database itself contains
70+
constraints named in the old form; this will cause the database server
71+
to raise an error message about modifying non-existent constraints.
72+
73+
If you need to work around this, there are two methods available:
74+
75+
1. Redirect the output of ``manage.py`` to a file, and edit the
76+
generated SQL to use the correct constraint names before
77+
executing it.
78+
79+
2. Examine the output of ``manage.py sqlall`` to see the new-style
80+
constraint names, and use that as a guide to rename existing
81+
constraints in your database.
82+
83+
Names changes in ``manage.py``
84+
------------------------------
85+
86+
A few of the options to ``manage.py`` have changed with the addition of fixture
87+
support:
88+
89+
* There are new ``dumpdata`` and ``loaddata`` commands which, as
90+
you might expect, will dump and load data to/from the
91+
database. These commands can operate against any of Django's
92+
supported serialization formats.
93+
94+
* The ``sqlinitialdata`` command has been renamed to ``sqlcustom`` to
95+
emphasize that ``loaddata`` should be used for data (and ``sqlcustom`` for
96+
other custom SQL -- views, stored procedures, etc.).
97+
98+
* The vestigial ``install`` command has been removed. Use ``syncdb``.
99+
100+
Backslash escaping changed
101+
--------------------------
102+
103+
The Django database API now escapes backslashes given as query parameters. If
104+
you have any database API code that matches backslashes, and it was working before
105+
(despite the lack of escaping), you'll have to change your code to "unescape" the
106+
slashes one level.
107+
108+
For example, this used to work::
109+
110+
# Find text containing a single backslash
111+
MyModel.objects.filter(text__contains='\\\\')
112+
113+
The above is now incorrect, and should be rewritten as::
114+
115+
# Find text containing a single backslash
116+
MyModel.objects.filter(text__contains='\\')
117+
118+
Removed ENABLE_PSYCO setting
119+
----------------------------
120+
121+
The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes
122+
``ENABLE_PSYCO`` it will have no effect; to use Psyco_, we recommend
123+
writing a middleware class to activate it.
124+
125+
.. _psyco: http://psyco.sourceforge.net/
126+
20127
What's new in 0.96?
21128
===================
22129

@@ -130,113 +237,6 @@ A small change, but a very nice one: dedicated views for adding and
130237
updating users have been added to the admin interface, so you no
131238
longer need to worry about working with hashed passwords in the admin.
132239

133-
Backwards-incompatible changes
134-
==============================
135-
136-
The following changes may require you to update your code when you switch from
137-
0.95 to 0.96:
138-
139-
`MySQLdb` version requirement
140-
-----------------------------
141-
142-
Due to a bug in older versions of the `MySQLdb` Python module (which
143-
Django uses to connect to MySQL databases), Django's MySQL backend now
144-
requires version 1.2.1p2 or higher of `MySQLdb`, and will raise
145-
exceptions if you attempt to use an older version.
146-
147-
If you're currently unable to upgrade your copy of `MySQLdb` to meet
148-
this requirement, a separate, backwards-compatible backend, called
149-
"mysql_old", has been added to Django. To use this backend, change
150-
the ``DATABASE_ENGINE`` setting in your Django settings file from
151-
this::
152-
153-
DATABASE_ENGINE = "mysql"
154-
155-
to this::
156-
157-
DATABASE_ENGINE = "mysql_old"
158-
159-
However, we strongly encourage MySQL users to upgrade to a more recent
160-
version of `MySQLdb` as soon as possible, The "mysql_old" backend is
161-
provided only to ease this transition, and is considered deprecated;
162-
aside from any necessary security fixes, it will not be actively
163-
maintained, and it will be removed in a future release of Django.
164-
165-
Also, note that some features, like the new ``DATABASE_OPTIONS``
166-
setting (see the `databases documentation`_ for details), are only
167-
available on the "mysql" backend, and will not be made available for
168-
"mysql_old".
169-
170-
.. _databases: ../databases/
171-
172-
Database constraint names changed
173-
---------------------------------
174-
175-
The format of the constraint names Django generates for foreign key
176-
references have changed slightly. These names are generally only used
177-
when it is not possible to put the reference directly on the affected
178-
column, so they is not always visible.
179-
180-
The effect of this change is that running ``manage.py reset`` and
181-
similar commands against an existing database may generate SQL with
182-
the new form of constraint name, while the database itself contains
183-
constraints named in the old form; this will cause the database server
184-
to raise an error message about modifying non-existent constraints.
185-
186-
If you need to work around this, there are two methods available:
187-
188-
1. Redirect the output of ``manage.py`` to a file, and edit the
189-
generated SQL to use the correct constraint names before
190-
executing it.
191-
192-
2. Examine the output of ``manage.py sqlall`` to see the new-style
193-
constraint names, and use that as a guide to rename existing
194-
constraints in your database.
195-
196-
Names changes in ``manage.py``
197-
------------------------------
198-
199-
A few of the options to ``manage.py`` have changed with the addition of fixture
200-
support:
201-
202-
* There are new ``dumpdata`` and ``loaddata`` commands which, as
203-
you might expect, will dump and load data to/from the
204-
database. These commands can operate against any of Django's
205-
supported serialization formats.
206-
207-
* The ``sqlinitialdata`` command has been renamed to ``sqlcustom`` to
208-
emphasize that ``loaddata`` should be used for data (and ``sqlcustom`` for
209-
other custom SQL -- views, stored procedures, etc.).
210-
211-
* The vestigial ``install`` command has been removed. Use ``syncdb``.
212-
213-
Backslash escaping changed
214-
--------------------------
215-
216-
The Django database API now escapes backslashes given as query parameters. If
217-
you have any database API code that matches backslashes, and it was working before
218-
(despite the lack of escaping), you'll have to change your code to "unescape" the
219-
slashes one level.
220-
221-
For example, this used to work::
222-
223-
# Find text containing a single backslash
224-
MyModel.objects.filter(text__contains='\\\\')
225-
226-
The above is now incorrect, and should be rewritten as::
227-
228-
# Find text containing a single backslash
229-
MyModel.objects.filter(text__contains='\\')
230-
231-
Removed ENABLE_PSYCO setting
232-
----------------------------
233-
234-
The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes
235-
``ENABLE_PSYCO`` it will have no effect; to use Psyco, we recommend
236-
writing a middleware class to activate it.
237-
238-
.. _psyco: http://psyco.sourceforge.net/
239-
240240
Thanks
241241
======
242242

0 commit comments

Comments
 (0)