Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-26 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:  fixed
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by ramiro):

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


-- 
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/064.2c0a024d451b606b6ca02531516160a0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-26 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Ramiro Morales ):

 In [changeset:"b785a80d1934ef05165f222779c3f47c32889825"]:
 {{{
 #!CommitTicketReference repository=""
 revision="b785a80d1934ef05165f222779c3f47c32889825"
 Added further fixes, tests for #19949/f33db5a09a.

 Thanks Susan Tan. Refs #19949.
 }}}

-- 
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/064.e2d8fb56c2f6dbf5e7376767baa3e8fd%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-24 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by susan):

 Thanks for catching the missing test. I forgot we had to test the cache
 after the loaders tries to load the missing template. I made a few
 comments on your 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 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/064.e8c2b8ff19c9dd3f6c3efa54c06b1424%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-24 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by ramiro):

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


Comment:

 I believe we need to work on this ticket a bit more.

 The tests added, although correct because they verify something didn't
 test before, don't actually test the fix introduced and so didn't fail
 beforehand.

 In particular these two lines:

 
https://github.com/django/django/blob/master/django/template/loaders/cached.py#L74-L75

 gives us a hint about the fact that this needs further investigation.

 I've opened a PR with tests changes. We can discuss things there if you
 wish: https://github.com/django/django/pull/1511

 It's not clear to me yet what the right fix would look like. Maybe we can
 reuse some code from the patch proposed by the OP (refactored to accompany
 the code evolution)?

 Reopening.

-- 
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/064.6370c2524a8c2219fd1eb2da9ec8d6f1%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-24 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:  fixed
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Description changed by ramiro:

Old description:

> In cases where multiple fallback templates are requested to the template
> loader (i.e. `django.template.loader.select_template()`) to find the
> first one available, the cached template loader does not cache non-
> existent templates, making cached loader "slow" again if every time it
> has to try looking for a template that's been already found to be
> missing.
>
> ``
> from django.template.loader import render_to_string
> render_to_string(['missing_template_1.html', 'missing_template_2.html',
> ..., 'missing_template_N.html', 'existent_template.html'])
> ``
>
> When using `django.template.loaders.cached.Loader`, and given that
> snippet above, and the fact that `missing_template_1.html` ...
> `missing_template_N.html` do not exist, the filesystem loader or other
> loaders get hit every time (trying and trying to find already known as
> missing templates).
>
> I'm attaching a patch to fix this.

New description:

 In cases where multiple fallback templates are requested to the template
 loader (i.e. `django.template.loader.select_template()`) to find the first
 one available, the cached template loader does not cache non-existent
 templates, making cached loader "slow" again if every time it has to try
 looking for a template that's been already found to be missing.

 {{{
 from django.template.loader import render_to_string
 render_to_string(['missing_template_1.html', 'missing_template_2.html',
 ..., 'missing_template_N.html', 'existent_template.html'])
 }}}

 When using `django.template.loaders.cached.Loader`, and given that snippet
 above, and the fact that `missing_template_1.html` ...
 `missing_template_N.html` do not exist, the filesystem loader or other
 loaders get hit every time (trying and trying to find already known as
 missing templates).

 I'm attaching a patch to fix 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 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/064.adcb4b7c9d9c1691d6e93dba85c29fae%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-24 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:  fixed
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timo):

 * status:  assigned => closed
 * needs_better_patch:  1 => 0
 * resolution:   => fixed


Comment:

 Fixed in f33db5a09acfc3df3085235a5712c46094eb9a0d.

-- 
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/064.98f12a6ac9ec29cfd6981b33af7ab1f6%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-22 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  susan
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by susan):

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


-- 
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/064.454262b81209bb7ab08747e6aa4b4714%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-22 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timo):

 * needs_better_patch:  0 => 1
 * needs_tests:  1 => 0


-- 
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/064.fcedaa4fb4c822a7823bffd2ae3a2dc3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-21 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  1 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by susan):

 https://github.com/django/django/pull/1501 I'm still debugging, I'm
 getting an error on this line L135:

 {{{
 template_tuple = cache_loader.load_template('missing.html',
 "django/tests/missing")
 }}}


 File "/../django/template/loaders/cached.py", line 27, in loaders
 for loader in self._loaders:
 TypeError: 'type' object is not iterable

 I'll appreciate any feedback.

-- 
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/064.fa144f67f9f6fe12478cb3ff548bf885%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-08-05 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  1 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timo):

 * needs_tests:  0 => 1


Comment:

 It would be good to add a test for 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 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/064.cc56ae59bbe7f0abae3cc8adf22176c6%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-03-07 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
--+
 Reporter:  Kronuz|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  1.5
 Severity:  Normal|   Resolution:
 Keywords:  templates cache   | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by jacob):

 * 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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-02-28 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
-+-
 Reporter:  Kronuz   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |  Version:  1.5
Component:  Template system  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  templates cache  |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Kronuz):

 * keywords:   => templates cache
 * component:  Uncategorized => Template system
 * has_patch:  0 => 1
 * type:  Uncategorized => Cleanup/optimization


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19949: Cached template loader doesn't cache TemplateDoesNotExist

2013-02-28 Thread Django
#19949: Cached template loader doesn't cache TemplateDoesNotExist
---+--
 Reporter:  Kronuz |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.5
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Kronuz):

 * cc: Kronuz (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.