Closed adamchainz closed 1 year ago
I didn't realize DaphneProcess
is used elsewhere in Daphne, in BaseDaphneTestingInstance
. If you accept this approach, I can fix up that class, which I think is mostly used in Daphne's own tests.
This would let us remove the start method workaround right? In which case yes let's see if we can get it right.
(That's the correct fix: I was merely applying the bandaid before.)
Thanks Adam!
Yes it would.
Let's have it then. 😀
If you want me to think harder before you take it on, leave it a couple of days for me to have a look at. Otherwise press on. (As you prefer)
Hey @adamchainz — I just adjusted to make BaseDaphneTestingInstance.__enter__
do the right thing. Can you take a look? Thanks!
Yeah seems good.
Thanks for looking so quickly @adamchainz 🥳
Part of a fix for https://github.com/django/channels/issues/1921.
Make
DaphneProcess
pickleable by:application
argument toget_application
, a callable that returns an application. If this is pickleable, the process will be.lambda
for plain-oldNone
pattern.