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

Render time only filter decorator #1759

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Louis-DR
Copy link

Added the @render_time_only decorator for filters and tests. It marks filters to not be resolved at compile time even if the arguments are constants. This can be useful as described in #1752 for time or memory intensive filters and tests, filters with global counting variables and changing global states, or filters that cause external actions such as printing, file operations or server requests.

The feature is tested by a new pytest, documented in changelog and the API documentation, passes pytest and tox (with a small tweak because mypy doesn't register set attributes).

@Louis-DR
Copy link
Author

Relating to issue #1752, @davidism can you review this MR ? The checks are good, the changelog and documentation are also aligned. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants