#21587: Make generic RedirectView default to permanent=False
-------------------------------------+-------------------------------------
     Reporter:  wraus@…              |                    Owner:
         Type:                       |  berkerpeksag
  Cleanup/optimization               |                   Status:  new
    Component:  Generic views        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  redirect, view       |             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):

 * cc: timo (removed)
 * cc: berkerpeksag (added)
 * status:  closed => new
 * has_patch:  1 => 0
 * resolution:  fixed =>


Comment:

 I think the strategy for silencing deprecation warnings is faulty. We need
 to silence when they are used in URLconfs similar to how is done in the
 
[https://github.com/django/django/blob/e9d1f1182aaccaa8b60cf6a3491f0103d2bb0229/tests/urlpatterns_reverse/urls.py#L17-L18
 url tests] although I think it needs to be:
 {{{
 with warnings.catch_warnings(record=True):
     warnings.filterwarnings('ignore', category=RemovedInDjango20Warning)
 }}}
 (at least the `module='...'` approach doesn't seem to work in
 [https://github.com/django/django/pull/3626 PR 3626], although I am not
 sure why.

 Right now the ordering of tests affects whether or not you will see
 errors. For example, run the following and you should get a warning:
 {{{
 python -Wall runtests.py test_client_regress
 }}}
 Since we are running with:
 {{{
 warnings.simplefilter("default", RemovedInDjango19Warning)
 warnings.simplefilter("default", RemovedInDjango20Warning)
 }}}
 in `runtests.py`, I think only the first occurrence of the warning in the
 test suite is output.

--
Ticket URL: <https://code.djangoproject.com/ticket/21587#comment:17>
Django <https://code.djangoproject.com/>
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/084.e292ebe542b8c1b4d4f913c5d122c375%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to