Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-24 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"f247c66bb5f95541d16143ef37452bb1dfeacc3e" f247c66b]:
 {{{
 #!CommitTicketReference repository=""
 revision="f247c66bb5f95541d16143ef37452bb1dfeacc3e"
 [3.1.x] Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for
 TemplateView kwarg deprecation warning."

 This reverts commit 20799cc0a6d98816b9ef0577e24691bd26b80d7d.

 Backport of 04e87e79a0bd2b1b9fdc30f884a637a3268733f0 from master
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.d91335bd78ce23ebb5cfa91825b821f5%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-24 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"e81aa7a94addf1f5380960fe89a49d104889c96d" e81aa7a]:
 {{{
 #!CommitTicketReference repository=""
 revision="e81aa7a94addf1f5380960fe89a49d104889c96d"
 [3.1.x] Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView
 passing URL kwargs into context."

 This reverts commit 4ed534758cb6a11df9f49baddecca5a6cdda9311.

 Backport of bb8f66934d93faf80cd1a2dda65aaedce21a6fc5 from master
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.80a3f258e99144f8b9286d4e008b0654%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-24 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"04e87e79a0bd2b1b9fdc30f884a637a3268733f0" 04e87e79]:
 {{{
 #!CommitTicketReference repository=""
 revision="04e87e79a0bd2b1b9fdc30f884a637a3268733f0"
 Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for TemplateView
 kwarg deprecation warning."

 This reverts commit 20799cc0a6d98816b9ef0577e24691bd26b80d7d.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.79dd4fe48473129f3d03836102060333%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-24 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"bb8f66934d93faf80cd1a2dda65aaedce21a6fc5" bb8f6693]:
 {{{
 #!CommitTicketReference repository=""
 revision="bb8f66934d93faf80cd1a2dda65aaedce21a6fc5"
 Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing
 URL kwargs into context."

 This reverts commit 4ed534758cb6a11df9f49baddecca5a6cdda9311.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.1737d9c351f04a16925b1561d4ec52fc%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-24 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam (Chainz) Johnson):

 I agree too.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.da6e5b656c66ab8329a15a5b108a8c72%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-24 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  0 => 1


Comment:

 Agreed, we should revert it since we don't have a clear deprecation path.

 [https://github.com/django/django/pull/13341 PR]

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.b9d084e1a321152ffe5b028e7b052bad%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-21 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tom Forbes):

 * cc: Tom Forbes (added)


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.f6d07518c57c982b3aa5ef8c6779f570%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-21 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tom Forbes):

 There isn't really a general purpose way of wrapping primitive/arbitrary
 types like this in Python that won't hit some corner cases. You can make
 an object appear to be a duck by adapting it's quacking dynamically (i.e
 `wrapt.ObjectProxy`), but if someone looks close enough they can always
 see that it's actually dog. And on the whole that's a good thing, IMO.

 Our use of `kwargs` makes this harder as we lose the ability to construct
 a container that can trigger the deprecation warning which would be the
 typical easy approach. There is no way to control what lands on the other
 side of `get_context_data()` (it's always a plain kwargs dict), and there
 is no way to construct a wrapper value that looks _exactly_ like the value
 it's wrapping.

 That basically leaves only "crazy" approaches, some of which are fun to
 consider but none of which are suitable. Here's one that uses `settrace()`
 to do what we need:

 {{{
 import sys

 class DeprecatedWrapper(dict):
 def __getitem__(self, key):
 warnings.warn("stop right there, scoundrel!")
 return super().__getitem__(key)

 def wrap_kwargs(frame, *args):
 frame['kwargs'] = DeprecatedWrapper(frame['kwargs'])
 sys.settrace(None)

 class TemplateView(...):
 def get(...):
 ...
 sys.settrace(wrap_kwargs)
 context = self.get_context_data(**context_kwargs)
 return self.render_to_response(context)
 }}}

 Given these issues, I'm not sure if we can go ahead with deprecating this.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.0c00e4c44f25ad2f8bd7bd0365ae4830%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-20 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  1 => 0
 * stage:  Ready for checkin => Accepted


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.696edc3b56430a8f0f10aa3772c8d37e%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-19 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam (Chainz) Johnson):

  Hmm this is a tough one.

 psycopg2 uses `type(obj)` to look for its "adapter" - in its C extension:
 
https://github.com/psycopg/psycopg2/blob/e14e3385b4809ec4223894f8c7a009b1560eb41d/psycopg/microprotocols.c#L151
 . So this "proxy" approach may not be feasible.

 I know of a more accurate proxy wrapper that proxies more attributes than
 Django's lazy objects - wrapt.ObjectProxy -
 https://wrapt.readthedocs.io/en/latest/wrappers.html#object-proxy. But
 docs there acknowledge that it can't even make `type()` work, whilst it
 makes `isinstance()` work.

 Any ideas of alternative approaches?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.65405446d334b821723b7c8ce2299945%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-19 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * status:  closed => new
 * resolution:  fixed =>


Comment:

 Passing deprecated keyword arguments to a queryset with lookups, e.g.
 `Artist.objects.get(name__iexact=artist_name)`, still crashes on
 PostgreSQL:
 {{{
 django.db.utils.ProgrammingError: can't adapt type '__proxy__'
 }}}
 Thanks Mohit Solanki for the report.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.aa742e7ced7071fb549c3bd3bdae523c%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-13 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"9ae40d813796b70eb57bb957a19a72213e97179c" 9ae40d81]:
 {{{
 #!CommitTicketReference repository=""
 revision="9ae40d813796b70eb57bb957a19a72213e97179c"
 [3.1.x] Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation
 warning.

 SimpleLazyObjects cause a crash when filtering.

 Thanks Tim L. White for the report.
 Regression in 4ed534758cb6a11df9f49baddecca5a6cdda9311.

 Backport of 20799cc0a6d98816b9ef0577e24691bd26b80d7d from master
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.1bd1a1d275d2f5c1b7cd41e717c31a0f%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-13 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"20799cc0a6d98816b9ef0577e24691bd26b80d7d" 20799cc0]:
 {{{
 #!CommitTicketReference repository=""
 revision="20799cc0a6d98816b9ef0577e24691bd26b80d7d"
 Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning.

 SimpleLazyObjects cause a crash when filtering.

 Thanks Tim L. White for the report.
 Regression in 4ed534758cb6a11df9f49baddecca5a6cdda9311.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.45adb1a2c32fddcafc597f4e8008ac3e%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-12 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  assigned
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * stage:  Accepted => Ready for checkin


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.badba104fd6a11fd1bd257315bbfcc7e%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-12 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  assigned
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/13297 PR]

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.6c06fa12b6f04cfdaa41a569ec7ef890%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-12 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  assigned
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam (Chainz) Johnson):

 Using lazy() instead of SimpleLazyObject() fixes this - PR is up.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.3a5328d17c70b472011cded1d0913bfc%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering.

2020-08-12 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+-
 Reporter:  Tim L. White |Owner:  Adam
 |  (Chainz) Johnson
 Type:  Bug  |   Status:  assigned
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam (Chainz) Johnson):

 * owner:  nobody => Adam (Chainz) Johnson
 * status:  new => assigned


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.5b609575ebcce2613efdf9ae70d2%40djangoproject.com.


Re: [Django] #31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that causes a crash when filtering. (was: In Django 3.1, get_object_or_404 does not resolve SimpleLazyObjects, a

2020-08-11 Thread Django
#31877: TemplateView.get_context_data()'s kwargs returns SimpleLazyObjects that
causes a crash when filtering.
-+
 Reporter:  Tim L. White |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  3.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by felixxm):

 * severity:  Normal => Release blocker
 * cc: Adam (Chainz) Johnson (added)
 * component:  Database layer (models, ORM) => Generic views
 * keywords:  SQLite =>
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report. `get_object_or_404()` and `QuerySet.filter()` with
 `SimpleLazyObject` throw the same exception in Django 2.2 or 3.0.

 `TemplateView.get_context_data()`'s `kwargs` returns `SimpleLazyObjects`
 in Django 3.1 which causes a crash. Passing URL kwargs into context is
 deprecated (see #19878) but should still work in Django 3.1 and 3.2.

 Regression in 4ed534758cb6a11df9f49baddecca5a6cdda9311.
 Reproduced at 60626162f76f26d32a38d18151700cb041201fb3.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.146aa37c229a0f751392998337f0cca3%40djangoproject.com.