-
Notifications
You must be signed in to change notification settings - Fork 148
Support async backend methods #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Hi @CristopherH95 can you fix the linter issues so we can see the tests running in CI? |
I updated the module sort, to address the |
I think I have figured out what the issue is. When I have three ideas for how to address this (though I am open to any other suggestions):
Is there any particular preference for the maintainers? |
I think it makes sense to add a dependency on the minimum version of Django we support, as other Django packages do. Could you open a separate pull request for that? |
@federicobond I opened a separate PR for adding Django as a dependency here: #201. However, I have run into another issue probably related to the lint problem here. Doing some more tests locally I find that, because Looking at the Django project itself, they also define |
This PR adds two new methods to the
ObjectPermissionsBackend
class, to support async environments:ahas_perm
andahas_module_perms
. These implementations just wrap the original sync versions insync_to_async
, which comes fromasgiref
(and should be included in all currently supported versions of Django).Resolves #199.
This PR used #197 as a base, so that PR should probably be merged before this one.