Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-28 Thread Django
#23895: ResolverMatch with some views is not pickleable
-+-
 Reporter:  Keryn Knight |Owner:  zatro
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  4.0
 Severity:  Normal   |   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 GitHub ):

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


Comment:

 In [changeset:"4c6a6d5ac7aa348d5b4b9a4d6bb7cc18af49f72a" 4c6a6d5a]:
 {{{
 #!CommitTicketReference repository=""
 revision="4c6a6d5ac7aa348d5b4b9a4d6bb7cc18af49f72a"
 Fixed #23895 -- Prevented pickling of ResolverMatch.

 Pickling a ResolverMatch did not work correctly in many cases,
 especially with CBVs and URLResolvers in the list of tried URL paths.
 }}}

-- 
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/067.263383170ba3e15e4625d9e2f1d09978%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-28 Thread Django
#23895: ResolverMatch with some views is not pickleable
-+-
 Reporter:  Keryn Knight |Owner:  zatro
 Type:  Bug  |   Status:  assigned
Component:  Core (URLs)  |  Version:  4.0
 Severity:  Normal   |   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 Mariusz Felisiak):

 * 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/067.6be2c92bf22dfbbb68359e4c0796caae%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-28 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  4.0
 Severity:  Normal|   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 zatro):

 Made a new ticket #32969 for improving pickling of `HTTPResponse`s.

-- 
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/067.db74296d06b7d505252e001772fb100d%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-28 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  4.0
 Severity:  Normal|   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 zatro):

 * needs_better_patch:  1 => 0


Comment:

 Changes from latest review have now been made.

-- 
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/067.d015cffa6ceceed75633a63e2898c149%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-28 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
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/067.4299a33aec91e6c84e596dd1e6f7731d%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-27 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  4.0
 Severity:  Normal|   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 zatro):

 * needs_better_patch:  1 => 0


Comment:

 I've now made the changes discussed and squashed the commits.

-- 
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/067.377f102c30854896af15b4a58ad96021%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-23 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
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/067.658565e62b4b03fb0690bdf4772f5247%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-19 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  4.0
 Severity:  Normal|   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 zatro):

 * has_patch:  0 => 1
 * version:  1.7 => 4.0


Comment:

 I've done a fix for this but it might not be the ideal solution. Thoughts?
 If it's okay, please let me know anything the PR is missing.
 [https://github.com/django/django/pull/14664 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/067.b13c3e83081d4f9b95514da5d67ad970%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2021-07-19 Thread Django
#23895: ResolverMatch with some views is not pickleable
--+
 Reporter:  Keryn Knight  |Owner:  zatro
 Type:  Bug   |   Status:  assigned
Component:  Core (URLs)   |  Version:  1.7
 Severity:  Normal|   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 zatro):

 * owner:  nobody => zatro
 * 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/067.36dab6fdf55a41896842f1380de34507%40djangoproject.com.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2015-01-23 Thread Django
#23895: ResolverMatch with some views is not pickleable
-+
 Reporter:  kezabelle|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.7
 Severity:  Normal   |   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 tomchristie):

 Haven't had a chance to confirm this much but appears that on 1.8-alpha
 this is consistently an issue, making responses non-cachable with
 CacheMiddleware. Alternative take would be for HttpResponse to take a more
 structured approach to caching - rather than simply dumping all attributes
 to pickle, just store the basics that allow a fresh HttpResponse with
 correct content, status code and headers to be reconstructed. (Eg. we
 shouldn't expect ResolverMatch instances to be picklable, but we *should*
 be constraining what we pickle for responses)

--
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/067.61862e9f615a699041c0e1b6000c0411%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23895: ResolverMatch with some views is not pickleable

2014-11-25 Thread Django
#23895: ResolverMatch with some views is not pickleable
-+
 Reporter:  kezabelle|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.7
 Severity:  Normal   |   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 timgraham):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => 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 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/067.ed0f7d59956863358ffe7d9c63e00f83%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #23895: ResolverMatch with some views is not pickleable

2014-11-22 Thread Django
#23895: ResolverMatch with some views is not pickleable
-+
 Reporter:  kezabelle|  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Core (URLs)  |Version:  1.7
 Severity:  Normal   |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+
 given something like the following:

 {{{

 def my_fbv(request):
 return HttpResponse('yay')

 # urls.py
 urlpatterns = [
 url('whatever', my_fbv, name='my_fbv'),
 ]
 }}}

 It is possible to do the following:
 {{{
 from django.core.urlresolvers import resolve
 from pickle import dumps, loads
 loads(dumps(resolve('whatever')))
 }}}
 and end up with a working `ResolverMatch`

 However, given a Class Based View (mapped to a urlconf via
 `MyView.as_view()`), or something like contrib.admin, you get something
 like the following:
 {{{
 dumps(resolve('/admin/myapp/'))
 [...]
 # for the admin ...
 PicklingError: Can't pickle : it's not
 found as django.contrib.admin.sites.app_index
 # for a CBV:
 PicklingError: Can't pickle : it's not
 the same object as myapp.views.Homepage
 }}}
 Both of which are raised by pickle's `save_global(self, obj, name, pack)`
 which recognises that it's a module+name combo (thus should be in scope)
 but isn't the same object in identity (`if x is not y`)

 Ordinarily, this is not a problem, but `resolver_match` is set onto a
 `request`, and I'm using the `django.test.client.Client` with
 multiprocessing, which requires the ability to pickle data to send back
 and forth, and evidently somewhere within the `TemplateResponse`s I'm
 dealing with, the request is being serialised (if I had to guess --
 probably in the context) and is '''sometimes''' failing (depending on the
 type of view mounted)

 Ideally, every `ResolverMatch` should be serialisable, or none should be,
 instead of the current situation where the project's urlconf may denote
 success or failure.

--
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/052.8647ecfaa34c9d302199f6646f5c232e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.