Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13316 closed enhancement (fixed)

Adapt to Trac 1.4 API

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TagsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

This continues some work started in #12788.

Attachments (0)

Change History (9)

comment:1 Changed 6 years ago by Ryan J Ollos

After r16924, the following error is seen on the Wiki edit page:

Traceback (most recent call last):
  File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/main.py", line 639, in _dispatch_request
    dispatcher.dispatch(req)
  File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/main.py", line 262, in dispatch
    method=method)
  File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/chrome.py", line 1423, in render_template
    fragment, iterable, method)
  File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/chrome.py", line 1485, in _render_jinja_template
    iterable)
  File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/chrome.py", line 1917, in _filter_jinja_page
    stream |= self._filter_stream(req, method, filename, data)
  File "/Users/rjollos/Documents/Workspace/trac-dev/pve/lib/python2.7/site-packages/genshi/core.py", line 133, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/web/chrome.py", line 1885, in inner
    stream, data)
  File "/Users/rjollos/Documents/Workspace/trac-dev/trac-hacks/tagsplugin/trunk/tractags/wiki.py", line 122, in filter_stream
    return self._wiki_edit(req, stream)
  File "/Users/rjollos/Documents/Workspace/trac-dev/trac-hacks/tagsplugin/trunk/tractags/wiki.py", line 270, in _wiki_edit
    value=req.args.get('tags', ' '.join(self._page_tags(req))))
TypeError: 'Fragment' object is not callable

comment:2 Changed 6 years ago by Ryan J Ollos

Status: assignedaccepted

comment:3 Changed 6 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16943:

TracTags 0.10dev: Make compatible with Trac 1.3.3dev

Fixes #13316.

comment:4 Changed 6 years ago by Ryan J Ollos

In 17046:

TracTags 0.10dev: Restore compatibility with Trac 1.2

Thanks to Jun Omae for the patch.

Fixes #13316.

comment:5 Changed 6 years ago by Ryan J Ollos

I knew I would end up leaving that debug statement in there. Sloppy!

comment:6 Changed 6 years ago by Ryan J Ollos

In 17047:

TracTags 0.10dev: Remove debug statement

Refs #13316.

comment:7 Changed 6 years ago by Jun Omae

I think we should use 1.3.1 rather than 1.2.3 for supporting Jinja2. We could use hasattr(Chrome(self.env), 'jenv') also.

-        if parse_version(__version__) < parse_version('1.2.3'):
+        if parse_version(__version__) < parse_version('1.3.1'):

However, admin_tag_change.html@17046 is still Genshi template. The render_admin_panel should return 'admin_tag_change.html', data, None.

See trac:wiki:TracDev/PortingFromGenshiToJinja#PanelProviders.

comment:8 Changed 6 years ago by Ryan J Ollos

Thanks. Please feel free to make the necessary changes.

comment:9 Changed 6 years ago by Ryan J Ollos

In 17050:

TracTags 0.10dev: Restore compatibility with Trac < 1.3.2

This revises incorrect changes in [17046:17047].

Refs #13316.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.