#11636 closed enhancement (fixed)
Refactoring of trac.notification
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | lowest | Milestone: | 1.1.2 |
Component: | notification | Version: | |
Severity: | normal | Keywords: | refactoring |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: |
|
||
Internal Changes: |
Description (last modified by )
Just a few refactorings I noticed while looking at code in the module: rjollos.git:t11636.
Attachments (0)
Change History (8)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:2 by , 11 years ago
Priority: | normal → lowest |
---|---|
Summary: | Refactoring trac.notification → Refactoring of trac.notification |
follow-up: 4 comment:3 by , 11 years ago
follow-up: 5 comment:4 by , 11 years ago
Replying to jomae:
Revised changes in log:rjollos.git:t11636.1: addressing points (1) and (2) from comment:3, as well as some other issues.
- Trivial thing: Currently
smtp_always_cc
andsmtp_always_bcc
can be separated by both space and comma characters. Butgetlist()
use only one as separator. That behavior is undocumented in the options.
Should we do anything to work around this? It could causes users trouble on upgrade if they have relied on using space separators. However, I'm not sure we want to continue to support unintended and inconsistent behavior, and the behavior of allowing space-separators seems to be a defect.
comment:5 by , 11 years ago
Replying to rjollos:
- Trivial thing: Currently
smtp_always_cc
andsmtp_always_bcc
can be separated by both space and comma characters. Butgetlist()
use only one as separator. That behavior is undocumented in the options.Should we do anything to work around this? It could causes users trouble on upgrade if they have relied on using space separators. However, I'm not sure we want to continue to support unintended and inconsistent behavior, and the behavior of allowing space-separators seems to be a defect.
The behavior might be intended. Cc field of ticket can be separated by space and comma characters, introduced in [1009]. I think smtp_always_{cc,bcc}
was implemented to have the same behavior in [3231].
I think we could improve ListOption
and getlist()
to allow multiple separators. The improvement will help to keep the behavior. See jomae.git@t11636.2. Thoughts?
comment:6 by , 11 years ago
Those changes look good. The properties that exist for backward compatibility could probably be marked for removal in a future release, such as 1.3.1.
comment:7 by , 11 years ago
API Changes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Changes committed to trunk in [12848:12849].
self.env.config
toself.config
in each method ofNotifyEmail
byself.config = env.config
inNotify.__init__()
.getlist()
automatically call.strip()
for each entry. I don't thinkx.strip()
is needed.smtp_always_cc
andsmtp_always_bcc
can be separated by both space and comma characters. Butgetlist()
use only one as separator. That behavior is undocumented in the options.