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

[BUG] Jinja2 warns that Jinja2 3.1 will no longer support contextfunction, must use renamed decorater as pass_context #60745

Closed
ScriptAutomate opened this issue Aug 16, 2021 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior dependency underlying Salt dependency issue Deprecation
Milestone

Comments

@ScriptAutomate
Copy link
Contributor

Description

Jinja gives a warning that contextfunction is being renamed to pass_context in Jinja 3.1:

/root/.pyenv/versions/3.6.10/lib/python3.6/site-packages/salt/utils/jinja.py:715: DeprecationWarning: 'contextfunction' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.

This looks like it may be a slight fix by modifying https://github.com/saltstack/salt/blob/master/salt/utils/jinja.py#L709 in order to avoid future problems with Jinja as our dependency tree upgrades over time. Though, I don't know how many additional steps may need to occur to ensure we can upgrade the dependency tree to contain Jinja 3.x.

Other related Salt issues around Jinja 3.x:

Additional context

Ref: pallets/jinja#1381

@ScriptAutomate ScriptAutomate added Bug broken, incorrect, or confusing behavior needs-triage labels Aug 16, 2021
@OrangeDog OrangeDog added dependency underlying Salt dependency issue Deprecation labels Aug 17, 2021
@OrangeDog OrangeDog added this to the Approved milestone Aug 17, 2021
@waynew waynew removed their assignment Aug 17, 2021
@jonyhy96
Copy link
Contributor

jonyhy96 commented Mar 3, 2022

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior dependency underlying Salt dependency issue Deprecation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants