Proposal to deprecate NullBooleanField (and remove in Django 4.0)

176 views
Skip to first unread message

Carlton Gibson

unread,
Mar 17, 2020, 3:49:58 AM3/17/20
to Django developers (Contributions to Django itself)
Hi all.


Proposes to deprecate NullBooleanField.


Allowed BooleanField to be null=True.
Introduced in Django 2.1.


I'm inclined to Accept.
Wonder if folks consider it a little too fast?
(We could defer for 5.0.)


Kind Regards,

Carlton

Aymeric Augustin

unread,
Mar 17, 2020, 4:00:17 AM3/17/20
to django-d...@googlegroups.com
Hello,

I'm inclined to Accept as well.

-- 
Aymeric.



--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/02a4b01d-e47f-4092-826e-c0cfa074901f%40googlegroups.com.

Mariusz Felisiak

unread,
Mar 17, 2020, 4:52:46 AM3/17/20
to Django developers (Contributions to Django itself)
Agreed, it's time to deprecate NullBooleanField.

Best,
Mariusz

Adam Johnson

unread,
Mar 17, 2020, 5:16:04 AM3/17/20
to django-d...@googlegroups.com

Shrawan Poudel

unread,
Mar 17, 2020, 6:00:50 AM3/17/20
to django-d...@googlegroups.com

Carlton Gibson

unread,
Mar 17, 2020, 6:11:00 AM3/17/20
to django-d...@googlegroups.com
Ok, that’s pretty quick and conclusive, so let’s progress. Thanks all. 

Markus Holtermann

unread,
Mar 17, 2020, 8:16:25 AM3/17/20
to Django developers
Makes sense. We'd have the deprecation shims around for a while anyway.

/Markus
> >>>> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/02a4b01d-e47f-4092-826e-c0cfa074901f%40googlegroups.com <https://groups.google.com/d/msgid/django-developers/02a4b01d-e47f-4092-826e-c0cfa074901f%40googlegroups.com?utm_medium=email&utm_source=footer>.
> >>>
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
> >>> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6353F843-B61D-4C50-8A45-98DAD860301A%40polytechnique.org <https://groups.google.com/d/msgid/django-developers/6353F843-B61D-4C50-8A45-98DAD860301A%40polytechnique.org?utm_medium=email&utm_source=footer>.
> >>
> >>
> >> --
> >> Adam
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3bCYzz3JMCVgXP1%2BmB56CCmTiHmw1ij%3Dbj_5aQSGWaZQ%40mail.gmail.com <https://groups.google.com/d/msgid/django-developers/CAMyDDM3bCYzz3JMCVgXP1%2BmB56CCmTiHmw1ij%3Dbj_5aQSGWaZQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAPD6JmmfPwGKjQ_Zjet0SENz3Rk26UhfRL9TrpX0Kxo7HdMWtA%40mail.gmail.com <https://groups.google.com/d/msgid/django-developers/CAPD6JmmfPwGKjQ_Zjet0SENz3Rk26UhfRL9TrpX0Kxo7HdMWtA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-develop...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAJwKpyRU95YkyRYbyZi388GB-wx9EMjGOMRQ6-3-exS1s46%3Dyg%40mail.gmail.com <https://groups.google.com/d/msgid/django-developers/CAJwKpyRU95YkyRYbyZi388GB-wx9EMjGOMRQ6-3-exS1s46%3Dyg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Mariusz Felisiak

unread,
Apr 24, 2020, 6:39:06 AM4/24/20
to Django developers (Contributions to Django itself)
`models.NullBooleanField` is now deprecated [1].

I would like to ask again about opinions on deprecating `forms.NullBooleanField` because I'm not convinced that it's necessary and expected. `forms.NullBooleanField` and `forms.BooleanField` use different widgets and their behavior is slightly different. Personally, I agree with Tim [2] that removing `forms.NullBooleanField` will needlessly increase complexity.

Best,
Mariusz

Adam Johnson

unread,
Apr 24, 2020, 6:55:26 AM4/24/20
to django-d...@googlegroups.com
I'm -1 on deprecating the form field. The different widgets make sense. Forms are decoupled from models for reasons like this.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.


--
Adam

charettes

unread,
Apr 24, 2020, 8:48:56 AM4/24/20
to Django developers (Contributions to Django itself)
I'm also -1 on removing the form field for the same reasons as Adam.
Reply all
Reply to author
Forward
0 new messages