Skip to content
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

Async filters are not awaited when with_context or with_environment is set #117

Closed
jg-rp opened this issue Apr 22, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@jg-rp
Copy link
Owner

jg-rp commented Apr 22, 2023

The async filter interface (new in version 1.9.0) falls apart when a class-based filter defining filter_async also sets with_context or with_environment to True.

This is due to our use of functools.partial to partially apply context and environment arguments. Subsequently causing hasattr(func, "filter_async") to return False when inspecting the filter at evaluation time.

@jg-rp jg-rp added the bug Something isn't working label Apr 22, 2023
@jg-rp jg-rp closed this as completed in bc869a1 Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant