Implement Asynchronous Authenticate Method#285
Conversation
|
@etianen looking into the failed check here, it looks like the problem may be related to versions of Python less than 3.9 not being available for the latest Ubuntu version (related issue I found: actions/setup-python#962). Should the action workflow be updated? |
|
@etianen just wanted to follow up on this and see if you have any thoughts. |
|
I'm so sorry! I missed your comment from May! 😱 Please do update the matrix. Only supporting 3.9+ makes total sense. We can add in up to 3.13 in their place. |
No worries! Sounds good, I can work on adding that to the PR. |
|
@etianen The matrix is updated with Python versions up to 3.12. There was a little trial-and-error on my part to get it working right, but it looks like all checks work as expected now. Let me know if there's anything else that should change! |
|
Lovely job! |
|
Released as v0.16.0! |
This PR resolves #284. The primary changes are as follows:
asgirefis added to theinstall_requiresinsetup.py. This is done because thesync_to_asyncandasync_to_syncfunctions are provided fromasgiref2.0.0 onward. Django distributions with async support automatically installasgiref, so the vast majority of the time this dependency should already be available.aauthenticatemethod is implemented inLDAPBackend, which runs a simple async wrapper aroundldap.authenticatecalledrun_authentication_async.testAuthenticateAsyncRunner, which checks thatrun_authentication_asynccallsldap.authenticateas expected.