#23641: Apps.set_installed_apps causes signals registered with apps as senders 
not
to be received
------------------------------+------------------------------------
     Reporter:  wrwrwr        |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  Core (Other)  |                  Version:  master
     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 wrwrwr):

 I'd leave it, it seems the double registration is even more likely when
 connecting signals within `ready` than on the module level. If
 `modify_settings` with installed apps is used to wrap a test `ready` is
 reexecuted, so without the `dispatach_uid`, if someone were to send any
 `post_migrate` signal from a test the handler would be processed twice.
 Maybe that should also be mentioned in the docs:
   (continuing) Otherwise consider providing `dispatch_uid` to avoid
 connecting your signals more than once when `ready` is reexecuted.
 That is unless we'd avoid calling ready more than once, something like
 [https://github.com/wrwrwr/django/compare/feature/testing-apps-with-
 nonreentrant-ready this] should do it (I'm aware you've decided against
 this in #22688 just a few months ago, sorry for bringing it back here).

--
Ticket URL: <https://code.djangoproject.com/ticket/23641#comment:5>
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/064.cdc67e6c5069ffd6f70771ccd84ab43a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to