Modify ↓
#14154 closed defect (fixed)
Make compatible with Jinja2 3.1+
| Reported by: | Owned by: | Jun Omae | |
|---|---|---|---|
| Priority: | normal | Component: | XmlRpcPlugin |
| Severity: | normal | Keywords: | jinja2 |
| Cc: | Olemis Lang | Trac Release: |
Description
When trying to load this plugin in Trac 1.5 / Python 3 (3.10), the trac log reports:
2022-09-08 15:22:38,544 Trac[loader] ERROR: Skipping "TracXMLRPC = tracrpc":
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/Trac-1.5.4.dev0-py3.10.egg/trac/loader.py", line 80, in _load_eggs
entry.load(require=True)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2471, in load
return self.resolve()
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2477, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.10/site-packages/TracXMLRPC-1.2.0.dev0-py3.10.egg/tracrpc/__init__.py", line 16, in <module>
from tracrpc.web_ui import *
File "/usr/lib/python3.10/site-packages/TracXMLRPC-1.2.0.dev0-py3.10.egg/tracrpc/web_ui.py", line 45, in <module>
class RPCWeb(Component):
File "/usr/lib/python3.10/site-packages/TracXMLRPC-1.2.0.dev0-py3.10.egg/tracrpc/web_ui.py", line 153, in RPCWeb
_expand_docs_jinja = jinja2.contextfunction(_expand_docs_jinja)
AttributeError: module 'jinja2' has no attribute 'contextfunction'
This with version 18497.
Attachments (0)
Change History (3)
comment:1 Changed 3 years ago by
| Keywords: | jinja2 added; python3 removed |
|---|---|
| Summary: | Unable to load XmlRpcPlugin in Trac 1.5 / Python 3 → Make compatible with Jinja2 3.1+ |
comment:3 Changed 3 years ago by
| Owner: | changed from osimons to Jun Omae |
|---|
Note: See
TracTickets for help on using
tickets.



jinja2.contextfunctionis replaced byjinja2.pass_contextin Jinja2 3.1.0.See also https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0