Bug 264990 - devel/py-Jinja2: Update to 3.1.2
Summary: devel/py-Jinja2: Update to 3.1.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Yuri Victorovich
URL: https://jinja.palletsprojects.com/en/...
Keywords:
Depends on:
Blocks: 266199
  Show dependency treegraph
 
Reported: 2022-07-02 11:33 UTC by p5B2EA84B3
Modified: 2022-11-13 23:56 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (nivit)
p5B2EA84B3: maintainer-feedback? (python)
p5B2EA84B3: maintainer-feedback? (rm)


Attachments
git diff (1.05 KB, patch)
2022-08-29 11:03 UTC, Andrej Ebert
no flags Details | Diff
portlint (137 bytes, text/plain)
2022-08-29 11:04 UTC, Andrej Ebert
no flags Details
poudriere testport (29.93 KB, text/plain)
2022-08-29 11:04 UTC, Andrej Ebert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description p5B2EA84B3 2022-07-02 11:33:32 UTC
Consider renaming port to devel/py-jinja as jinja2 is now version 3.x and devel/py-jinja is devel/py-Jinja expired on 2017-03-03

Changes 


Version 3.1.2

Released 2022-04-28

    Add parameters to Environment.overlay to match __init__. #1645

    Handle race condition in FileSystemBytecodeCache. #1654

Version 3.1.1

Released 2022-03-25

    The template filename on Windows uses the primary path separator. #1637

Version 3.1.0

Released 2022-03-24

    Drop support for Python 3.6. #1534

    Remove previously deprecated code. #1544

        WithExtension and AutoEscapeExtension are built-in now.

        contextfilter and contextfunction are replaced by pass_context. evalcontextfilter and evalcontextfunction are replaced by pass_eval_context. environmentfilter and environmentfunction are replaced by pass_environment.

        Markup and escape should be imported from MarkupSafe.

        Compiled templates from very old Jinja versions may need to be recompiled.

        Legacy resolve mode for Context subclasses is no longer supported. Override resolve_or_missing instead of resolve.

        unicode_urlencode is renamed to url_quote.

    Add support for native types in macros. #1510

    The {% trans %} tag can use pgettext and npgettext by passing a context string as the first token in the tag, like {% trans "title" %}. #1430

    Update valid identifier characters from Python 3.6 to 3.7. #1571

    Filters and tests decorated with @async_variant are pickleable. #1612

    Add items filter. #1561

    Subscriptions ([0], etc.) can be used after filters, tests, and calls when the environment is in async mode. #1573

    The groupby filter is case-insensitive by default, matching other comparison filters. Added the case_sensitive parameter to control this. #1463

    Windows drive-relative path segments in template names will not result in FileSystemLoader and PackageLoader loading from drive-relative paths. #1621

Version 3.0.3

Released 2021-11-09

    Fix traceback rewriting internals for Python 3.10 and 3.11. #1535

    Fix how the native environment treats leading and trailing spaces when parsing values on Python 3.10. #1537

    Improve async performance by avoiding checks for common types. #1514

    Revert change to hash(Node) behavior. Nodes are hashed by id again #1521

    PackageLoader works when the package is a single module file. #1512

Version 3.0.2

Released 2021-10-04

    Fix a loop scoping bug that caused assignments in nested loops to still be referenced outside of it. #1427

    Make compile_templates deterministic for filter and import names. #1452, #1453

    Revert an unintended change that caused Undefined to act like StrictUndefined for the in operator. #1448

    Imported macros have access to the current template globals in async environments. #1494

    PackageLoader will not include a current directory (.) path segment. This allows loading templates from the root of a zip import. #1467
Comment 1 Andrej Ebert 2022-08-29 11:03:06 UTC
Created attachment 236211 [details]
git diff

Update to 3.1.2, fixed COMMENT
Comment 2 Andrej Ebert 2022-08-29 11:04:28 UTC
Created attachment 236212 [details]
portlint
Comment 3 Andrej Ebert 2022-08-29 11:04:45 UTC
Created attachment 236213 [details]
poudriere testport
Comment 4 ruben 2022-10-06 14:08:00 UTC
This also fixes using (complex) macros with Ansible as described in https://github.com/ansible/ansible/issues/77272

With 3.0.1 Jinja2

$ ansible localhost -m debug -a "msg='{% macro foo(v) %}{{ v }}{% endmacro %} {{ foo(1) }}'"
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | FAILED! => {
    "msg": "Unexpected templating type error occurred on ({% macro foo(v) %}{{ v }}{% endmacro %} {{ foo(1) }}): sequence item 0: expected str instance, int found"
}
$ pkg info -I py39-{ansible,Jinja2}
py39-ansible-6.1.0             Radically simple IT automation
py39-Jinja2-3.0.1              Fast and easy to use stand-alone template engine

With 3.1.2 Jinja2

$ ansible localhost -m debug -a "msg='{% macro foo(v) %}{{ v }}{% endmacro %} {{ foo(1) }}'"
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | SUCCESS => {
    "msg": " 1"
}
$ pkg info -I py39-{ansible,Jinja2}
py39-ansible-6.1.0             Radically simple IT automation
py39-Jinja2-3.1.2              Fast and easy to use stand-alone template engine
Comment 5 Sean Champ 2022-11-07 08:10:05 UTC
If the two cents could be of any interest, a newer Jinja might be needed for devel/py-jupyterlab. Great to see if someone's already worked out a patch for it
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-09 00:15:22 UTC
Port updated.
Thanks
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-11-09 00:21:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=23cc43859179b1bb1b6932ccee2559ed5f66a968

commit 23cc43859179b1bb1b6932ccee2559ed5f66a968
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-11-08 15:03:00 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-11-09 00:21:12 +0000

    devel/py-Jinja2: Update 3.0.1 -> 3.1.2; Fix test target

    PR:             260440 264990
    Approved by:    nivit@ (maintainer's timoeut on 260440; 10.5 months)
    Submitted by:   brd@, p5B2EA84B3@t-online.de

 devel/py-Jinja2/Makefile | 11 +++++------
 devel/py-Jinja2/distinfo |  6 +++---
 2 files changed, 8 insertions(+), 9 deletions(-)
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2022-11-13 23:56:17 UTC
Copied from bug 260440 comment 4 ...

@Yuri This sphinx update caused a regression.

This port is maintained by python@, nivit@ just happened to be assigned to nivit@. 

The correct/better course of action would have been a reset of assignee to python@ (as it wasn't on our radar). It was an assignee timeout, not a maintainer timeout.

Not withstanding, comment 1 detailed what was necessary to progress, which wasn't ack'd.

The missing bulk / consumer  build test would have picked up the regression.

Further, this update was for 3.0.3 (which wouldn't have broken the build)

The commit updating to 3.1 should have gone through a cycle on this issue, including updating the summary to match.