Merge lp:~danci-emanuel/mailman/dlists_support_added into lp:~danci-emanuel/mailman/mm_orig

Proposed by Emanuel Danci on 2012-07-10
Status: Needs review
Proposed branch: lp:~danci-emanuel/mailman/dlists_support_added
Merge into: lp:~danci-emanuel/mailman/mm_orig
Diff against target: 120 lines (+12/-9)
6 files modified
src/mailman/database/schema/postgres.sql (+1/-0)
src/mailman/database/schema/sqlite.sql (+1/-0)
src/mailman/interfaces/mailinglist.py (+5/-2)
src/mailman/model/mailinglist.py (+1/-0)
src/mailman/rest/configuration.py (+3/-3)
src/mailman/styles/default.py (+1/-4)
To merge this branch: bzr merge lp:~danci-emanuel/mailman/dlists_support_added
Reviewer Review Type Date Requested Status
Robin J (community) 2012-07-10 Approve on 2012-07-11
Emanuel Danci Pending
Review via email: mp+114161@code.launchpad.net
To post a comment you must log in.
Robin J (robin-jeffries) wrote :

This all looks reasonable, but I don't have the larger context of what these files are actually doing.

At line 114, why did you delete mlist.advertised?

It also looks like you are arbitrarily changing the indentation at lines 44 and 82. That's not good.

With those changes, it's probably OK for now. (you need a larger context to be able to test it, I think -- like something that uses the dlists_enabled variable?

review: Approve
Emanuel Danci (danci-emanuel) wrote :

> This all looks reasonable, but I don't have the larger context of what these
> files are actually doing.
>
> At line 114, why did you delete mlist.advertised?
>
> It also looks like you are arbitrarily changing the indentation at lines 44
> and 82. That's not good.
>
> With those changes, it's probably OK for now. (you need a larger context to be
> able to test it, I think -- like something that uses the dlists_enabled
> variable?

Indeed, I deleted mlist.advertised while doing some testing and I missed adding it back. Thanks for outlining this!
As for the indentation, I changed it while adding some code in those parts, but although I changed it back to the original form, it seems that the commit did not take into considerations those changes. In those parts, the code looks like in the original files now.

Unmerged revisions

7160. By Emanuel Danci on 2012-07-10

Contains the changes needed for supporting Dynamic sublists

7159. By Emanuel Danci on 2012-07-10

Contains the changes needed for supporting Dynamic sublists

7158. By Emanuel Danci on 2012-07-10

Dynamic sublists support added

7157. By Emanuel Danci on 2012-07-09

Contains the changes needed for supporting Dynamic sublists

7156. By Emanuel Danci on 2012-07-09

contains UI changes needed for supporing Dynamic sublists

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mailman/database/schema/postgres.sql'
2--- src/mailman/database/schema/postgres.sql 2012-03-23 02:38:49 +0000
3+++ src/mailman/database/schema/postgres.sql 2012-07-10 11:11:19 +0000
4@@ -19,6 +19,7 @@
5 admin_notify_mchanges BOOLEAN,
6 administrivia BOOLEAN,
7 advertised BOOLEAN,
8+ dlists_enabled BOOLEAN,
9 anonymous_list BOOLEAN,
10 archive BOOLEAN,
11 archive_private BOOLEAN,
12
13=== modified file 'src/mailman/database/schema/sqlite.sql'
14--- src/mailman/database/schema/sqlite.sql 2012-03-23 02:38:49 +0000
15+++ src/mailman/database/schema/sqlite.sql 2012-07-10 11:11:19 +0000
16@@ -115,6 +115,7 @@
17 admin_notify_mchanges BOOLEAN,
18 administrivia BOOLEAN,
19 advertised BOOLEAN,
20+ dlists_enabled BOOLEAN,
21 anonymous_list BOOLEAN,
22 archive BOOLEAN,
23 archive_private BOOLEAN,
24
25=== modified file 'src/mailman/interfaces/mailinglist.py'
26--- src/mailman/interfaces/mailinglist.py 2012-03-23 02:38:49 +0000
27+++ src/mailman/interfaces/mailinglist.py 2012-07-10 11:11:19 +0000
28@@ -123,6 +123,9 @@
29 """Advertise this mailing list when people ask for an overview of the
30 available mailing lists.""")
31
32+ dlists_enabled = Attribute(
33+ """Is the Dynamic sublists feature enabled for this list?""")
34+
35 # Contact addresses
36
37 posting_address = Attribute(
38@@ -196,8 +199,8 @@
39 administrators = Attribute(
40 """The IUser administrators of this mailing list.
41
42- This includes the IUsers who are both owners and moderators of the
43- mailing list.""")
44+ This includes the IUsers who are both owners and moderators of the
45+ mailing list.""")
46
47 members = Attribute(
48 """An iterator over all the members of the mailing list, regardless of
49
50=== modified file 'src/mailman/model/mailinglist.py'
51--- src/mailman/model/mailinglist.py 2012-04-26 02:08:22 +0000
52+++ src/mailman/model/mailinglist.py 2012-07-10 11:11:19 +0000
53@@ -82,6 +82,7 @@
54 include_list_post_header = Bool()
55 include_rfc2369_headers = Bool()
56 advertised = Bool()
57+ dlists_enabled = Bool()
58 anonymous_list = Bool()
59 # Attributes not directly modifiable via the web u/i
60 created_at = DateTime()
61
62=== modified file 'src/mailman/rest/configuration.py'
63--- src/mailman/rest/configuration.py 2012-03-15 22:48:41 +0000
64+++ src/mailman/rest/configuration.py 2012-07-10 11:11:19 +0000
65@@ -162,6 +162,7 @@
66 admin_notify_mchanges=GetterSetter(as_boolean),
67 administrivia=GetterSetter(as_boolean),
68 advertised=GetterSetter(as_boolean),
69+ dlists_enabled = GetterSetter(as_boolean),
70 anonymous_list=GetterSetter(as_boolean),
71 autorespond_owner=GetterSetter(enum_validator(ResponseAction)),
72 autorespond_postings=GetterSetter(enum_validator(ResponseAction)),
73@@ -205,11 +206,10 @@
74 welcome_message_uri=GetterSetter(unicode),
75 )
76
77-
78 VALIDATORS = ATTRIBUTES.copy()
79 for attribute, gettersetter in VALIDATORS.items():
80 if gettersetter.decoder is None:
81- del VALIDATORS[attribute]
82+ del VALIDATORS[attribute]
83
84
85
86
87@@ -233,7 +233,7 @@
88 return http.bad_request(
89 [], b'Unknown attribute: {0}'.format(self._attribute))
90 else:
91- attribute = self._attribute
92+ attribute = self._attribute
93 value = ATTRIBUTES[attribute].get(self._mlist, attribute)
94 resource[attribute] = value
95 return http.ok([], etag(resource))
96
97=== modified file 'src/mailman/styles/default.py'
98--- src/mailman/styles/default.py 2012-05-10 03:36:59 +0000
99+++ src/mailman/styles/default.py 2012-07-10 11:11:19 +0000
100@@ -24,12 +24,9 @@
101 'DefaultStyle',
102 ]
103
104-
105 # XXX Styles need to be reconciled with lazr.config.
106-
107 from datetime import timedelta
108 from zope.interface import implementer
109-
110 from mailman.core.i18n import _
111 from mailman.interfaces.action import Action, FilterAction
112 from mailman.interfaces.bounce import UnrecognizedBounceDisposition
113@@ -62,7 +59,7 @@
114 mlist.post_id = 1
115 mlist.new_member_options = 256
116 mlist.respond_to_post_requests = True
117- mlist.advertised = True
118+ mlist.dlists_enabled = False
119 mlist.max_num_recipients = 10
120 mlist.max_message_size = 40 # KB
121 mlist.reply_goes_to_list = ReplyToMunging.no_munging

Subscribers

People subscribed via source and target branches

to all changes: