FreeBSD Bugzilla – Attachment 229565 Details for
Bug 259910
[patch] www/trac-devel: Jinja2 incompatibility
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
trac-devel.patch (text/plain), 3.57 KB, created by
david
on 2021-11-18 06:30:54 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
david
Created:
2021-11-18 06:30:54 UTC
Size:
3.57 KB
patch
obsolete
>diff --git a/www/trac-devel/files/patch-trac_ticket_templates_report_view.html b/www/trac-devel/files/patch-trac_ticket_templates_report_view.html >new file mode 100644 >index 000000000000..8b5f41eaf59f >--- /dev/null >+++ b/www/trac-devel/files/patch-trac_ticket_templates_report_view.html >@@ -0,0 +1,10 @@ >+--- trac/ticket/templates/report_view.html.orig 2021-11-12 22:46:16.202776000 -0500 >++++ trac/ticket/templates/report_view.html 2021-11-12 22:47:00.574131000 -0500 >+@@ -162,6 +162,7 @@ >+ # for value_for_group, row_group in row_groups: >+ # if loop.first: >+ <thead> >++ # set header_group, header = None, None >+ # set column_headers >+ # for header_group in header_groups: >+ <tr class="trac-columns"> >diff --git a/www/trac-devel/files/patch-trac_util_html.py b/www/trac-devel/files/patch-trac_util_html.py >new file mode 100644 >index 000000000000..c2f8de6c10f4 >--- /dev/null >+++ b/www/trac-devel/files/patch-trac_util_html.py >@@ -0,0 +1,11 @@ >+--- trac/util/html.py.orig 2021-11-12 22:38:53.472197000 -0500 >++++ trac/util/html.py 2021-11-12 22:39:16.270275000 -0500 >+@@ -24,7 +24,7 @@ >+ from html import entities >+ from html.parser import HTMLParser >+ >+-from markupsafe import Markup, escape as escape_quotes >++from markupsafe import Markup, escape as escape_quotes, soft_unicode >+ >+ try: >+ from babel.support import LazyProxy >diff --git a/www/trac-devel/files/patch-trac_util_presentation.py b/www/trac-devel/files/patch-trac_util_presentation.py >new file mode 100644 >index 000000000000..3bb934aed3e3 >--- /dev/null >+++ b/www/trac-devel/files/patch-trac_util_presentation.py >@@ -0,0 +1,19 @@ >+--- trac/util/presentation.py.orig 2020-12-19 21:35:50.000000000 -0500 >++++ trac/util/presentation.py 2021-11-12 22:38:20.810013000 -0500 >+@@ -21,13 +21,13 @@ >+ from math import ceil >+ import re >+ >+-from jinja2 import Markup, Undefined, contextfilter, evalcontextfilter >++from jinja2 import Undefined, contextfilter, evalcontextfilter >+ from jinja2.filters import make_attrgetter >+-from jinja2.utils import soft_unicode >+ >+ from trac.core import TracError >+ from .datefmt import to_utimestamp, utc >+-from .html import Fragment, classes, html_attribute, styles, tag >++from .html import (Fragment, Markup, classes, html_attribute, soft_unicode, >++ styles, tag) >+ from .text import javascript_quote >+ >+ __all__ = ['captioned_button', 'classes', 'first_last', 'group', 'istext', >diff --git a/www/trac-devel/files/patch-trac_util_text.py b/www/trac-devel/files/patch-trac_util_text.py >new file mode 100644 >index 000000000000..b0d7df4d7568 >--- /dev/null >+++ b/www/trac-devel/files/patch-trac_util_text.py >@@ -0,0 +1,31 @@ >+--- trac/util/text.py.orig 2021-11-12 22:39:41.538768000 -0500 >++++ trac/util/text.py 2021-11-12 22:44:17.722414000 -0500 >+@@ -22,6 +22,7 @@ >+ import configparser >+ import locale >+ import os >++import pkg_resources >+ import re >+ import sys >+ import textwrap >+@@ -43,6 +44,11 @@ >+ >+ # -- Jinja2 >+ >++_jinja2_ver = pkg_resources.parse_version(jinja2.__version__) >++_jinja2_exts = ['jinja2.ext.do', 'jinja2.ext.i18n'] >++if _jinja2_ver < pkg_resources.parse_version('3'): >++ _jinja2_exts.append('jinja2.ext.with_') >++ >+ def jinja2env(**kwargs): >+ """Creates a Jinja2 ``Environment`` configured with Trac conventions. >+ >+@@ -65,7 +71,7 @@ >+ line_comment_prefix='##', >+ trim_blocks=True, >+ lstrip_blocks=True, >+- extensions=['jinja2.ext.do', 'jinja2.ext.i18n', 'jinja2.ext.with_'], >++ extensions=list(_jinja2_exts), >+ finalize=filterout_none, >+ autoescape=autoescape_extensions, >+ )
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 259910
: 229565