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

Proposed by Emanuel Danci
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) Approve
Emanuel Danci Pending
Review via email: mp+114161@code.launchpad.net
To post a comment you must log in.
Revision history for this message
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
Revision history for this message
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

Contains the changes needed for supporting Dynamic sublists

7159. By Emanuel Danci

Contains the changes needed for supporting Dynamic sublists

7158. By Emanuel Danci

Dynamic sublists support added

7157. By Emanuel Danci

Contains the changes needed for supporting Dynamic sublists

7156. By Emanuel Danci

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
=== modified file 'src/mailman/database/schema/postgres.sql'
--- src/mailman/database/schema/postgres.sql 2012-03-23 02:38:49 +0000
+++ src/mailman/database/schema/postgres.sql 2012-07-10 11:11:19 +0000
@@ -19,6 +19,7 @@
19 admin_notify_mchanges BOOLEAN,19 admin_notify_mchanges BOOLEAN,
20 administrivia BOOLEAN,20 administrivia BOOLEAN,
21 advertised BOOLEAN,21 advertised BOOLEAN,
22 dlists_enabled BOOLEAN,
22 anonymous_list BOOLEAN,23 anonymous_list BOOLEAN,
23 archive BOOLEAN,24 archive BOOLEAN,
24 archive_private BOOLEAN,25 archive_private BOOLEAN,
2526
=== modified file 'src/mailman/database/schema/sqlite.sql'
--- src/mailman/database/schema/sqlite.sql 2012-03-23 02:38:49 +0000
+++ src/mailman/database/schema/sqlite.sql 2012-07-10 11:11:19 +0000
@@ -115,6 +115,7 @@
115 admin_notify_mchanges BOOLEAN,115 admin_notify_mchanges BOOLEAN,
116 administrivia BOOLEAN,116 administrivia BOOLEAN,
117 advertised BOOLEAN,117 advertised BOOLEAN,
118 dlists_enabled BOOLEAN,
118 anonymous_list BOOLEAN,119 anonymous_list BOOLEAN,
119 archive BOOLEAN,120 archive BOOLEAN,
120 archive_private BOOLEAN,121 archive_private BOOLEAN,
121122
=== modified file 'src/mailman/interfaces/mailinglist.py'
--- src/mailman/interfaces/mailinglist.py 2012-03-23 02:38:49 +0000
+++ src/mailman/interfaces/mailinglist.py 2012-07-10 11:11:19 +0000
@@ -123,6 +123,9 @@
123 """Advertise this mailing list when people ask for an overview of the123 """Advertise this mailing list when people ask for an overview of the
124 available mailing lists.""")124 available mailing lists.""")
125125
126 dlists_enabled = Attribute(
127 """Is the Dynamic sublists feature enabled for this list?""")
128
126 # Contact addresses129 # Contact addresses
127130
128 posting_address = Attribute(131 posting_address = Attribute(
@@ -196,8 +199,8 @@
196 administrators = Attribute(199 administrators = Attribute(
197 """The IUser administrators of this mailing list.200 """The IUser administrators of this mailing list.
198201
199 This includes the IUsers who are both owners and moderators of the202 This includes the IUsers who are both owners and moderators of the
200 mailing list.""")203 mailing list.""")
201204
202 members = Attribute(205 members = Attribute(
203 """An iterator over all the members of the mailing list, regardless of206 """An iterator over all the members of the mailing list, regardless of
204207
=== modified file 'src/mailman/model/mailinglist.py'
--- src/mailman/model/mailinglist.py 2012-04-26 02:08:22 +0000
+++ src/mailman/model/mailinglist.py 2012-07-10 11:11:19 +0000
@@ -82,6 +82,7 @@
82 include_list_post_header = Bool()82 include_list_post_header = Bool()
83 include_rfc2369_headers = Bool()83 include_rfc2369_headers = Bool()
84 advertised = Bool()84 advertised = Bool()
85 dlists_enabled = Bool()
85 anonymous_list = Bool()86 anonymous_list = Bool()
86 # Attributes not directly modifiable via the web u/i87 # Attributes not directly modifiable via the web u/i
87 created_at = DateTime()88 created_at = DateTime()
8889
=== modified file 'src/mailman/rest/configuration.py'
--- src/mailman/rest/configuration.py 2012-03-15 22:48:41 +0000
+++ src/mailman/rest/configuration.py 2012-07-10 11:11:19 +0000
@@ -162,6 +162,7 @@
162 admin_notify_mchanges=GetterSetter(as_boolean),162 admin_notify_mchanges=GetterSetter(as_boolean),
163 administrivia=GetterSetter(as_boolean),163 administrivia=GetterSetter(as_boolean),
164 advertised=GetterSetter(as_boolean),164 advertised=GetterSetter(as_boolean),
165 dlists_enabled = GetterSetter(as_boolean),
165 anonymous_list=GetterSetter(as_boolean),166 anonymous_list=GetterSetter(as_boolean),
166 autorespond_owner=GetterSetter(enum_validator(ResponseAction)),167 autorespond_owner=GetterSetter(enum_validator(ResponseAction)),
167 autorespond_postings=GetterSetter(enum_validator(ResponseAction)),168 autorespond_postings=GetterSetter(enum_validator(ResponseAction)),
@@ -205,11 +206,10 @@
205 welcome_message_uri=GetterSetter(unicode),206 welcome_message_uri=GetterSetter(unicode),
206 )207 )
207208
208
209VALIDATORS = ATTRIBUTES.copy()209VALIDATORS = ATTRIBUTES.copy()
210for attribute, gettersetter in VALIDATORS.items():210for attribute, gettersetter in VALIDATORS.items():
211 if gettersetter.decoder is None:211 if gettersetter.decoder is None:
212 del VALIDATORS[attribute]212 del VALIDATORS[attribute]
213213
214214
215215
216216
@@ -233,7 +233,7 @@
233 return http.bad_request(233 return http.bad_request(
234 [], b'Unknown attribute: {0}'.format(self._attribute))234 [], b'Unknown attribute: {0}'.format(self._attribute))
235 else:235 else:
236 attribute = self._attribute236 attribute = self._attribute
237 value = ATTRIBUTES[attribute].get(self._mlist, attribute)237 value = ATTRIBUTES[attribute].get(self._mlist, attribute)
238 resource[attribute] = value238 resource[attribute] = value
239 return http.ok([], etag(resource))239 return http.ok([], etag(resource))
240240
=== modified file 'src/mailman/styles/default.py'
--- src/mailman/styles/default.py 2012-05-10 03:36:59 +0000
+++ src/mailman/styles/default.py 2012-07-10 11:11:19 +0000
@@ -24,12 +24,9 @@
24 'DefaultStyle',24 'DefaultStyle',
25 ]25 ]
2626
27
28# XXX Styles need to be reconciled with lazr.config.27# XXX Styles need to be reconciled with lazr.config.
29
30from datetime import timedelta28from datetime import timedelta
31from zope.interface import implementer29from zope.interface import implementer
32
33from mailman.core.i18n import _30from mailman.core.i18n import _
34from mailman.interfaces.action import Action, FilterAction31from mailman.interfaces.action import Action, FilterAction
35from mailman.interfaces.bounce import UnrecognizedBounceDisposition32from mailman.interfaces.bounce import UnrecognizedBounceDisposition
@@ -62,7 +59,7 @@
62 mlist.post_id = 159 mlist.post_id = 1
63 mlist.new_member_options = 25660 mlist.new_member_options = 256
64 mlist.respond_to_post_requests = True61 mlist.respond_to_post_requests = True
65 mlist.advertised = True62 mlist.dlists_enabled = False
66 mlist.max_num_recipients = 1063 mlist.max_num_recipients = 10
67 mlist.max_message_size = 40 # KB64 mlist.max_message_size = 40 # KB
68 mlist.reply_goes_to_list = ReplyToMunging.no_munging65 mlist.reply_goes_to_list = ReplyToMunging.no_munging

Subscribers

People subscribed via source and target branches

to all changes: