Skip to content

Commit da8e722

Browse files
committed
Some work on the 0.96 release notes
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent e21a4c8 commit da8e722

File tree

1 file changed

+96
-62
lines changed

1 file changed

+96
-62
lines changed

docs/release_notes_0.96.txt

Lines changed: 96 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ Welcome to Django 0.96!
66

77
The primary goal for 0.96 is a cleanup and stabilization of the features
88
introduced in 0.95. There have been a few small `backwards-incompatible
9-
changes`_ since 0.95, but nearly all changes shouldn't require any major
10-
updates.
9+
changes`_ since 0.95, but the upgrade process should be fairly simple
10+
and should not require major changes to existing applications.
1111

1212
However, we're also releasing 0.96 now because we have a set of
13-
backwards-incompatible changes scheduled for the near future. These changes are
14-
will require code changes for developers tracking the Django development
15-
version, so if you're looking for a rock-solid, stable, version of Django we
16-
recommend you stick with Django until the next official release and upgrade all
17-
at once.
13+
backwards-incompatible changes scheduled for the near future. Once
14+
completed, they will involve some code changes for application
15+
developers, so we recommend that you stick with Django 0.96 until the
16+
next official release; then you'll be able to upgrade in one step
17+
instead of needing to make incremental changes to keep up with the
18+
development version of Django.
1819

1920
What's new in 0.96?
2021
===================
@@ -26,34 +27,35 @@ most notable changes in this release.
2627
New forms library
2728
-----------------
2829

29-
``django.newforms`` is Django's fantastic new form-handling library. It's a
30-
replacement for ``django.forms``, the old form/manipulator/validation framework.
31-
Both APIs are available in 0.96, but over the next two releases we plan to
32-
completely replace the old forms framework with this new one.
30+
``django.newforms`` is Django's new form-handling library. It's a
31+
replacement for ``django.forms``, the old form/manipulator/validation
32+
framework. Both APIs are available in 0.96, but over the next two
33+
releases we plan to switch completely to the new forms system, and
34+
deprecate and remove the old system.
3335

34-
Our transition plan is:
36+
There are three elements to this transition:
3537

36-
* We've copied the current ``django.forms`` to ``django.oldforms``. This
37-
allows you to upgrade your code *now* rather than waiting for the
38-
backwards-incompatible change and rushing to fix your code after the fact.
39-
Just change your import statements like this::
38+
* We've copied the current ``django.forms`` to
39+
``django.oldforms``. This allows you to upgrade your code *now*
40+
rather than waiting for the backwards-incompatible change and
41+
rushing to fix your code after the fact. Just change your
42+
import statements like this::
4043

4144
from django import forms # 0.95-style
4245
from django import oldforms as forms # 0.96-style
4346

44-
* Before the next release, we will move the current ``django.newforms`` to
45-
``django.forms``. This will be a backwards-incompatible change, and
46-
anybody who is still using the old version of ``django.forms`` at that
47-
time will need to change their import statements, as described in the
48-
previous bullet.
47+
* The next official release of Django will move the current
48+
``django.newforms`` to ``django.forms``. This will be a
49+
backwards-incompatible change, and anyone still using the old
50+
version of ``django.forms`` at that time will need to change
51+
their import statements as described above.
4952

50-
* We will remove ``django.oldforms`` in the release *after* the next Django
51-
release -- the release that comes after the release in which we're
52-
creating the new ``django.forms``.
53+
* The next release after that will completely remove
54+
``django.oldforms``.
5355

5456
Although the ``newforms`` library will continue to evolve, it's ready for use
5557
for most common cases. We recommend that anyone new to form handling skip the
56-
old forms and start with the new.
58+
old forms system and start with the new.
5759

5860
For more information about ``django.newforms``, read the `newforms
5961
documentation`_.
@@ -82,9 +84,10 @@ can now be rewritten as::
8284
('^myview/$', myview)
8385
)
8486

85-
A very useful application of this can be seen when using decorators: this change
86-
allows you to apply decorators to views *in your URLconf*. Thus, you can make a
87-
generic view require login very easily::
87+
One useful application of this can be seen when using decorators; this
88+
change allows you to apply decorators to views *in your
89+
URLconf*. Thus, you can make a generic view require login very
90+
easily::
8891

8992
from django.conf.urls.defaults import *
9093
from django.contrib.auth.decorators import login_required
@@ -109,8 +112,8 @@ Django now includes a test framework so you can start transmuting fear into
109112
boredom (with apologies to Kent Beck). You can write tests based on doctest_
110113
or unittest_ and test your views with a simple test client.
111114

112-
There is also new support for "fixtures" -- initial data stored in any of the
113-
supported `serialization formats`_ that will be loaded into your database at the
115+
There is also new support for "fixtures" -- initial data, stored in any of the
116+
supported `serialization formats`_, that will be loaded into your database at the
114117
start of your tests. This makes testing with real data much easier.
115118

116119
See `the testing documentation`_ for the full details.
@@ -120,61 +123,93 @@ See `the testing documentation`_ for the full details.
120123
.. _the testing documentation: ../testing/
121124
.. _serialization formats: ../serialization/
122125

126+
Improvements to the admin interface
127+
-----------------------------------
123128

124-
Improvements to the user admin interface
125-
----------------------------------------
126-
127-
A small change, but a very nice one: you no longer need to edit MD5 hashes when
128-
creating and/or updating users from the admin interface.
129-
130-
Django is now hash-free for over a thousand revisions!
129+
A small change, but a very nice one: dedicated views for adding and
130+
updating users have been added to the admin interface, so you no
131+
longer need to worry about working with hashed passwords in the admin.
131132

132133
Backwards-incompatible changes
133134
==============================
134135

135136
The following changes may require you to update your code when you switch from
136137
0.95 to 0.96:
137138

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+
138166
Database constraint names changed
139167
---------------------------------
140168

141-
The format of the constraint names Django generates for foreign key references
142-
changed slightly. These names are only used sometimes, when it is not possible
143-
to put the reference directly on the affected column, so this is not always
144-
visible.
169+
The format of the constraint names Django generates for foreign key
170+
references have changed slightly. These names are generally only used
171+
when it is not possible to put the reference directly on the affected
172+
column, so they is not always visible.
145173

146-
The effect of this change is that ``manage.py reset`` and similar commands may
147-
generate SQL with new constraint names and thus generate an error when run
148-
against the database (the database server will complain about the constraint not
149-
existing). To fix this, you will need to tweak the output of ``manage.py``
150-
to match the correct constraint names and pass the results to the
151-
database server manually.
174+
The effect of this change is that running ``manage.py reset`` and
175+
similar commands against an existing database may generate SQL with
176+
the new form of constraint name, while the database itself contains
177+
constraints named in the old form; this will cause the database server
178+
to raise an error message about modifying non-existent constraints.
152179

153-
You can also fix this by examining the output of ``manage.py sqlall`` and
154-
renaming database constraints to match the new naming scheme.
180+
If you need to work around this, there are two methods available:
181+
182+
1. Redirect the output of ``manage.py`` to a file, and edit the
183+
generated SQL to use the correct constraint names before
184+
executing it.
185+
186+
2. Examine the output of ``manage.py sqlall`` to see the new-style
187+
constraint names, and use that as a guide to rename existing
188+
constraints in your database.
155189

156190
Names changes in ``manage.py``
157191
------------------------------
158192

159193
A few of the options to ``manage.py`` have changed with the addition of fixture
160194
support:
161195

162-
* There are new ``dumpdata`` and ``loaddata`` commands, which, as you might
163-
expect, will dump and load data to/from the database. These targets
164-
operate against one of the serialization formats.
196+
* There are new ``dumpdata`` and ``loaddata`` commands which, as
197+
you might expect, will dump and load data to/from the
198+
database. These commands can operate against any of Django's
199+
supported serialization formats.
165200

166-
* The ``sqlinitialdata`` target has been renamed to ``sqlcustom`` to
201+
* The ``sqlinitialdata`` command has been renamed to ``sqlcustom`` to
167202
emphasize that ``loaddata`` should be used for data (and ``sqlcustom`` for
168203
other custom SQL -- views, stored procedures, etc.).
169204

170-
* The vestigal ``install`` target is gone. Use ``syncdb``.
205+
* The vestigial ``install`` command has been removed. Use ``syncdb``.
171206

172207
Backslash escaping changed
173208
--------------------------
174209

175210
The Django database API now escapes backslashes given as query parameters. If
176-
you have any database API code that match backslashes, and it was working before
177-
(despite the broken escaping), you'll have to change your code to "unescape" the
211+
you have any database API code that matches backslashes, and it was working before
212+
(despite the lack of escaping), you'll have to change your code to "unescape" the
178213
slashes one level.
179214

180215
For example, this used to work::
@@ -191,18 +226,17 @@ Removed ENABLE_PSYCO setting
191226
----------------------------
192227

193228
The ``ENABLE_PSYCO`` setting no longer exists. If your settings file includes
194-
``ENABLE_PSYCO``, nothing will break per se, but it just won't do anything.
195-
196-
If you want to use Psyco_ with Django, you'll need to write some custom
197-
middleware that activates Psyco.
229+
``ENABLE_PSYCO`` it will have no effect; to use Psyco, we recommend
230+
writing a middleware class to activate it.
198231

199232
.. _psyco: http://psyco.sourceforge.net/
200233

201234
Thanks
202235
======
203236

204-
Since 0.95, a number of people have stepped forward and taken a major new role in Django's development. We'd like to thank these
205-
people for all their hard work:
237+
Since 0.95, a number of people have stepped forward and taken a major
238+
new role in Django's development. We'd like to thank these people for
239+
all their hard work:
206240

207241
* Russell Keith-Magee and Malcolm Tredinnick for their major code
208242
contributions. This release wouldn't have been possible without them.

0 commit comments

Comments
 (0)