Skip to content

unify/rename context function decorators#1389

Merged
davidism merged 2 commits intomasterfrom
unify-decorators
Apr 10, 2021
Merged

unify/rename context function decorators#1389
davidism merged 2 commits intomasterfrom
unify-decorators

Conversation

@davidism
Copy link
Copy Markdown
Member

@davidism davidism commented Apr 10, 2021

Functions, including filters, tests, and finalize, all use pass_context, pass_eval_context, and pass_environment. A single variable, jinja_pass_arg is set to an enum member. The enum class has a from_obj method to check if a given function/callable class has the variable. It also handles showing deprecation warnings for all the other names.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@davidism davidism added this to the 3.0.0 milestone Apr 10, 2021
Use pass_context instead of contextfilter and contextfunction, etc.
@davidism davidism merged commit 39846a8 into master Apr 10, 2021
@davidism davidism deleted the unify-decorators branch April 10, 2021 17:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unify contextfilter and contextfunction markers

1 participant