Modify

Opened 3 months ago

Closed 3 months ago

#14274 closed enhancement (fixed)

Support for Trac 1.6

Reported by: Joachim Mairböck Owned by: Jun Omae
Priority: normal Component: TracTicketReferencePlugin
Severity: normal Keywords:
Cc: Trac Release: 1.6

Description

It would be nice if this plugin was updated to support Trac 1.6.

I understand that this uses ITemplateStreamFilter, so porting it is likely non-trivial.

I have a (probably incomplete) patch with some changes for python 3 compatibility but the actual Trac changes are still missing.

Attachments (1)

python3.patch (2.3 KB) - added by Joachim Mairböck 3 months ago.
incomplete patch for python 3 support

Download all attachments as: .zip

Change History (11)

Changed 3 months ago by Joachim Mairböck

Attachment: python3.patch added

incomplete patch for python 3 support

comment:1 Changed 3 months ago by Tetsuya Morimoto

I do not use trac now, so it's difficult to maintain it in the future. I want to delegate maintenance privileges to someone if possible.

comment:2 Changed 3 months ago by Jun Omae

Okay. I'll push the proposed patch after reviewing it and testing.

In the patch, I'd suggest using explicit relative import (e.g. from .model import ...) rather than absolute import for Python 2 and 3.

-from model import CUSTOM_FIELDS, TICKETREF, TicketLinks
-from utils import cnv_sorted_refs
+from ticketref.model import CUSTOM_FIELDS, TICKETREF, TicketLinks
+from ticketref.utils import cnv_sorted_refs

-from utils import cnv_list2text, cnv_sorted_refs, cnv_text2list
+from ticketref.utils import cnv_list2text, cnv_sorted_refs, cnv_text2list

comment:3 Changed 3 months ago by Ryan J Ollos

Owner: changed from Tetsuya Morimoto to Jun Omae
Status: newassigned

comment:4 Changed 3 months ago by Jun Omae

Resolution: fixed
Status: assignedclosed

In 18616:

TracTicketReferencePlugin: make compatible with Trac 1.6 (closes #14274)

comment:5 Changed 3 months ago by Jun Omae

In 18617:

TracTicketReferencePlugin: modify Python in the classifiers with 2.7 and 3, and enable [bdist_wheel] universal option (refs #14274)

comment:6 Changed 3 months ago by Tetsuya Morimoto

I appreciate maintaining this plugin. Thank you!

comment:7 Changed 3 months ago by Joachim Mairböck

Resolution: fixed
Status: closedreopened

Thank you for (nearly) fixing this so fast!

One minor thing is still missing: web_ui.py is using reduce(), so it is missing a from functools import reduce. Can you fix this please?

comment:8 Changed 3 months ago by Jun Omae

In 18618:

TracTicketReferencePlugin: fix missing import for reduce (refs #14274)

comment:9 Changed 3 months ago by Jun Omae

Oh, I missed it. I've ran tests and confirmed tests passing, however I didn't notice no tests for web_ui.py. Please try the latest. Thanks!

comment:10 Changed 3 months ago by Joachim Mairböck

Resolution: fixed
Status: reopenedclosed

Thanks for the fix!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
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.