I've just run the suite under Postgres with the default removed, and I
don't see any errors, except for the #6755 error noted by Andrew.
However, that test appears to just be written to rely on the default
value, rather than requiring the default value.
I've also run the full test suite under MySQL/MyISAM [1] with the same result.
I don't remember what the "interesting failures" were -- but based on
the timestamp, this would have been something Malcolm was cleaning up
just prior to the v1.0 release. My guess would be that the
'interesting failures' stem from MySQL's slightly weird handling of
booleans -- while I don't know the specifics, it's not hard to imagine
that somewhere in the combination of interpretations and translations
of NULL, None, '0', 0 and False, something could go wrong. However,
we've significantly improved the handling of booleans in the MySQL
backend since r8050 landed, so it's possible the problems Malcolm was
referring to have been inadvertently fixed.
However, since Malcolm didn't include a test case, I suppose we'll
never know for certain.
So - working on the assumption that the problem doesn't exist anymore
(which based on Django's test suite, appears to be the case), what is
the right behavior?
I agree that the current behavior is strange, and the original
behavior preferred by #2855 seems right to me.
If we decide to revert the default, it's probably worth mentioning it
in the release notes -- even though a bug fix isn't technically a
backwards incompatibility, this issue is big enough a change that I
can see it causing confusion. For that reason, I'm also inclined to
suggest that we *shouldn't* backport the change.
Yours,
Russ Magee %-)
----
[1] A neat trick I've discovered: You can run the full MySQL test
suite a lot faster if you use
./runtest.py --settings=mysql --pair=bug639
bug639 is a simple, one test case bug, so the --pair is effectively
just "run every single test, but run each test in an isolated
environment". As a result, db flushes are a lot cheaper, so the suite
runs a lot faster. Error reporting is a lot more verbose, but that's a
small price to pay.
Rather, a BooleanField that raises an error on an attempt to save an instance that has no value set is what's being asked for. The quiet always defaulting to False does seem rather odd to me as well.
From the point of view of the model layer, your point makes sense.
However, I think the UI is the challenge. This would force every
BooleanField to have a drop-down (like NullBooleanField) instead of a
checkbox, at least on the /add/ forms.
Richard