Re: [Django] #27154: Minor difference in behavior between CallableFalse/CallableTrue and False/True.

2016-08-31 Thread Django
#27154: Minor difference in behavior between CallableFalse/CallableTrue and
False/True.
--+
 Reporter:  tomchristie   |Owner:  alexyer
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  contrib.auth  |  Version:  1.10
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+

Comment (by alexyer):

 Here is the [https://github.com/django/django/pull/7190 PR]. Thanks.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.06954d11addfc0f9dfa42ee8ac9e1d1d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27154: Minor difference in behavior between CallableFalse/CallableTrue and False/True.

2016-08-31 Thread Django
#27154: Minor difference in behavior between CallableFalse/CallableTrue and
False/True.
--+
 Reporter:  tomchristie   |Owner:  alexyer
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  contrib.auth  |  Version:  1.10
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+
Changes (by alexyer):

 * status:  new => assigned
 * owner:  nobody => alexyer


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.c8877f084dcbab989ad044286de6bbc5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27154: Minor difference in behavior between CallableFalse/CallableTrue and False/True.

2016-08-30 Thread Django
#27154: Minor difference in behavior between CallableFalse/CallableTrue and
False/True.
--+
 Reporter:  tomchristie   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.auth  |  Version:  1.10
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+
Changes (by timgraham):

 * severity:  Normal => Release blocker


Comment:

 The implementation can follow commit
 54afa960d1ee8c63635225a0f0a2489971b5aab5.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.869044e9649b637b7ab02d315d103a29%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27154: Minor difference in behavior between CallableFalse/CallableTrue and False/True.

2016-08-30 Thread Django
#27154: Minor difference in behavior between CallableFalse/CallableTrue and
False/True.
--+
 Reporter:  tomchristie   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.auth  |  Version:  1.10
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+
Changes (by bmispelon):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The change seems simple enough and I don't see any drawbacks to adding it.

 If we can make our users' lives easier, I'm +1 on it.

 If anyone is interested in tackling this, the
 `CallableFalse`/`CallableTrue` classes are defined in
 `django/utils/deprecation.py`.


 Once the change is made, I think we should also discuss backporting it.


 Thanks.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.f367bdbdf78b2c07f1b2e666fcb93bc9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27154: Minor difference in behavior between CallableFalse/CallableTrue and False/True.

2016-08-30 Thread Django
#27154: Minor difference in behavior between CallableFalse/CallableTrue and
False/True.
--+
 Reporter:  tomchristie   |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  contrib.auth  |Version:  1.10
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  1 |  UI/UX:  0
--+
 Original raised as a ticket in REST framework:
 https://github.com/tomchristie/django-rest-framework/issues/4439

 Something that may confuse users calling `.is_authenticated`...

 There's a slight difference in behavior between how the
 CallableFalse/CallableTrue instances behave compare to how False/True
 behave.

 The Python boolean type happens to support the bitwise OR operator, and
 its behavior in this case is exactly equivalent to the `or` operator. Eg.
 `False | True` returns `True`

 The backwards compat CallableFalse/CallableTrue instances do not support
 this usage, and will fail with eg. `TypeError: unsupported operand type(s)
 for |: 'instance' and 'bool'`

 Their behavior is reasonable enough, and the user should really be using
 the boolean `or` operator, but we might introduce slightly less friction
 (ie don't raise a slightly opaque error message to the user) if we simply
 support and allow the bitwise operator in the same way as the boolean
 equivalents.

 I'm probably a +0 on resolving this, as think it'd save a few folks a bit
 of head banging. Certainly wouldn't dispute a `wontfix` categorization.

 Tip for easy pickings folks: Should be resolvable by including an `__or__`
 method on the CallableFalse/CallableTrue classes.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.c98a0a0546f159a352c49889f1fb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.