Opened 9 years ago
Last modified 9 years ago
#12518 new task
Implement new notification API
Reported by: | Franz | Owned by: | Franz |
---|---|---|---|
Priority: | low | Component: | MailPlugin |
Severity: | normal | Keywords: | API |
Cc: | Trac Release: | 1.0 |
Description
With version 1.1.3 Trac changed his notification API (see Advanced Notification enhancements).
This new API should also be used in MailPlugin.
The ticket is not critical, since MailPlugin also works fine with 1.1.x (tested with 1.1.6)
Attachments (3)
Change History (4)
Changed 9 years ago by
Attachment: | XMailEMailModule.py_PARTLY.diff added |
---|
Changed 9 years ago by
Attachment: | XMailEMailModule.py_API added |
---|
Patch with new notification API, but not working
comment:1 Changed 9 years ago by
Patch XMailEMailModule.py_PARTLY.diff is partly working (sends mail, but without subject and encoding is wrong), but it is probably not using the recommended way of the new API (see also module API of Package notification).
Patch XMailEMailModule.py_API.diff uses probably more of the recommended way, but apparently incorrect, since Trac throws Exception too many values to unpack
; stacktrace is:
File "build\bdist.win32\egg\xmail\XMailEMailModule.py", line 522, in run self.func() File "build\bdist.win32\egg\xmail\XMailEMailModule.py", line 161, in _sendAllMails notifyer.send_mails(username, notify_data) File "build\bdist.win32\egg\xmail\XMailEMailModule.py", line 415, in send_mails datetime.now(utc), author)) File "build\bdist.win32\egg\trac\notification\api.py", line 358, in notify self.distribute_event(event, self.subscriptions(event)) File "build\bdist.win32\egg\trac\notification\api.py", line 369, in distribute_event for sid, authenticated, address, transport, format in subscriptions: too many values to unpack
Changed 9 years ago by
Attachment: | XMailEMailModule.py_API.diff added |
---|
Patch with new notification API, but not working
Patch for partly implemented API