#11854 closed enhancement (fixed)
Split up notification module
Reported by: | Peter Suter | Owned by: | Peter Suter |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.3 |
Component: | notification | Version: | |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | Branch: | |
Release Notes: |
Split up |
||
API Changes: |
Added mail notification helper functions |
||
Internal Changes: |
Description
The Advanced Notification proposal starts with splitting up the trac/notification.py into:
trac/notification/api.py
containing interface definitions and theNotificationSystem
.trac/notification/mail.py
containing any email specific functionality likeSmtpEmailSender
andSendmailEmailSender
.trac/notification/compat.py
containing theNotify
/NotifyEmail
base classes. (After #3517 these andTicketNotifyEmail
would only remain for backward compatibility and could be deprecated and removed later.)
For backwards compatibility these will also be imported in trac/notification/__init__.py
.
I'd also like to extract some useful pieces from NotifyEmail
and TicketNotifyEmail
into trac/notification/mail.py
, so we can reuse them later.
The proposed changes are in log:psuter@advanced-notification-preliminary-refactorings.
Attachments (0)
Change History (7)
comment:1 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 10 years ago
follow-up: 5 comment:3 by , 10 years ago
It looks like NotificationSystem
has an indirect import. Any reason for that, or was it just an oversight?
-
trac/notification/__init__.py
diff --git a/trac/notification/__init__.py b/trac/notification/__init__.py index 2a44766..efb9c2b 100644
a b 12 12 # history and logs, available at http://trac.edgewall.org/log/. 13 13 14 14 # Imports for backward compatibility 15 from trac.notification.api import IEmailSender 16 from trac.notification.compat import Notif icationSystem, Notify, NotifyEmail15 from trac.notification.api import IEmailSender, NotificationSystem 16 from trac.notification.compat import Notify, NotifyEmail 17 17 from trac.notification.mail import (EMAIL_LOOKALIKE_PATTERN, MAXHEADERLEN, 18 18 SmtpEmailSender, SendmailEmailSender)
comment:4 by , 10 years ago
Cc: | added |
---|
comment:5 by , 10 years ago
Replying to rjollos:
It looks like
NotificationSystem
has an indirect import. Any reason for that, or was it just an oversight?
Just an oversight. I don't recall any special intent. Please commit, thanks.
comment:6 by , 10 years ago
It seems this is from Jun's cleanup in #4056, so I might also have missed the intent.
Committed to trunk in [13433].