django / asgiref

ASGI specification and utilities
https://asgi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
1.47k stars 209 forks source link

Move variable initialization in AsyncToSync from __init__ to __call__ #439

Closed germaniuss closed 8 months ago

germaniuss commented 9 months ago

Closes #438

andrewgodwin commented 9 months ago

OK, so the code still looks good, but since this code is best tested to within an inch of its life - think you can write a test that ensures this behaviour is there in future?

germaniuss commented 9 months ago

OK, so the code still looks good, but since this code is best tested to within an inch of its life - think you can write a test that ensures this behaviour is there in future?

Sure thing

germaniuss commented 9 months ago

Done! Wasn't really sure about the test naming though.

andrewgodwin commented 8 months ago

I think the test naming is fine - just satisfy the linter, and I'll land it!

EDIT: Wait, 3.8 failed, womp womp. It's still in security release mode so we do still need to support it.

ttys0dev commented 8 months ago

Wait, 3.8 failed, womp womp.

Well we can just conditionally disable that specific test that's breaking on 3.8 like in #440.

andrewgodwin commented 8 months ago

Merged in the form of #440 instead.