diff options
| -rw-r--r-- | src/mailman/database/base.py | 1 | ||||
| -rw-r--r-- | src/mailman/database/schema/mm_20120407000000.py | 6 | ||||
| -rw-r--r-- | src/mailman/database/schema/sqlite_20120407000000_01.sql | 2 | ||||
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 2 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.rst | 2 | ||||
| -rw-r--r-- | src/mailman/model/mailinglist.py | 1 | ||||
| -rw-r--r-- | src/mailman/rest/configuration.py | 1 | ||||
| -rw-r--r-- | src/mailman/rest/docs/configuration.rst | 3 | ||||
| -rw-r--r-- | src/mailman/styles/default.py | 1 |
9 files changed, 9 insertions, 10 deletions
diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py index 41d9374f9..694ad9ec3 100644 --- a/src/mailman/database/base.py +++ b/src/mailman/database/base.py @@ -189,6 +189,7 @@ class StormBaseDatabase: continue log.debug('migrating db to %s: %s', version, module_path) upgrade(self, self.store, version, module_path) + self.commit() def load_sql(self, store, sql): """Load the given SQL into the store. diff --git a/src/mailman/database/schema/mm_20120407000000.py b/src/mailman/database/schema/mm_20120407000000.py index df192b2ae..89bc52eca 100644 --- a/src/mailman/database/schema/mm_20120407000000.py +++ b/src/mailman/database/schema/mm_20120407000000.py @@ -27,6 +27,7 @@ All column changes are in the `mailinglist` table. - archive, archive_private -> archive_policy * Remove: + - generic_nonmember_action - nntp_host See https://bugs.launchpad.net/mailman/+bug/971013 for details. @@ -130,7 +131,8 @@ def upgrade_postgres(database, store, version, module_path): archive_policy(archive, archive_private), id)) # Now drop the old columns. - store.execute('ALTER TABLE mailinglist DROP COLUMN archive;') - store.execute('ALTER TABLE mailinglist DROP COLUMN archive_private;') + for column in ('archive', 'archive_private', 'generic_nonmember_action'): + store.execute( + 'ALTER TABLE mailinglist DROP COLUMN {0};'.format(column)) # Record the migration in the version table. database.load_schema(store, version, None, module_path) diff --git a/src/mailman/database/schema/sqlite_20120407000000_01.sql b/src/mailman/database/schema/sqlite_20120407000000_01.sql index e5d3a39ff..a4eb0adce 100644 --- a/src/mailman/database/schema/sqlite_20120407000000_01.sql +++ b/src/mailman/database/schema/sqlite_20120407000000_01.sql @@ -87,7 +87,6 @@ CREATE TABLE ml_backup( forward_auto_discards BOOLEAN, gateway_to_mail BOOLEAN, gateway_to_news BOOLEAN, - generic_nonmember_action INTEGER, goodbye_message_uri TEXT, header_matches BLOB, header_uri TEXT, @@ -197,7 +196,6 @@ INSERT INTO ml_backup SELECT forward_auto_discards, gateway_to_mail, gateway_to_news, - generic_nonmember_action, goodbye_message_uri, header_matches, header_uri, diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py index 6ad648623..c69a8c545 100644 --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -91,6 +91,7 @@ class TestMigration20120407Schema(MigrationTestBase): for present in ('archive', 'archive_private', 'archive_volume_frequency', + 'generic_nonmember_action', 'include_list_post_header', 'news_moderation', 'news_prefix_subject_too', @@ -118,6 +119,7 @@ class TestMigration20120407Schema(MigrationTestBase): for missing in ('archive', 'archive_private', 'archive_volume_frequency', + 'generic_nonmember_action', 'include_list_post_header', 'news_moderation', 'news_prefix_subject_too', diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index 6b376006d..1af8d559c 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -105,6 +105,8 @@ Bug fixes * Show devmode in `bin/mailman info` output. (LP: #1035028) * Fix residual references to the old `IMailingList` archive variables. (LP: #1031393) + * Removed obsolete `IMailingList` attribute `generic_nonmember_action. + (LP: #975696) .. _`passlib`: http://packages.python.org/passlib/index.html diff --git a/src/mailman/model/mailinglist.py b/src/mailman/model/mailinglist.py index fde82f997..68d086ec5 100644 --- a/src/mailman/model/mailinglist.py +++ b/src/mailman/model/mailinglist.py @@ -148,7 +148,6 @@ class MailingList(Model): forward_auto_discards = Bool() gateway_to_mail = Bool() gateway_to_news = Bool() - generic_nonmember_action = Int() goodbye_message_uri = Unicode() header_matches = Pickle() header_uri = Unicode() diff --git a/src/mailman/rest/configuration.py b/src/mailman/rest/configuration.py index 307f415b6..9c32d4b48 100644 --- a/src/mailman/rest/configuration.py +++ b/src/mailman/rest/configuration.py @@ -181,7 +181,6 @@ ATTRIBUTES = dict( digest_size_threshold=GetterSetter(float), filter_content=GetterSetter(as_boolean), fqdn_listname=GetterSetter(None), - generic_nonmember_action=GetterSetter(int), mail_host=GetterSetter(None), allow_list_posts=GetterSetter(as_boolean), include_rfc2369_headers=GetterSetter(as_boolean), diff --git a/src/mailman/rest/docs/configuration.rst b/src/mailman/rest/docs/configuration.rst index 8194356e2..43ddc0f60 100644 --- a/src/mailman/rest/docs/configuration.rst +++ b/src/mailman/rest/docs/configuration.rst @@ -41,7 +41,6 @@ All readable attributes for a list are available on a sub-resource. display_name: Test-one filter_content: False fqdn_listname: test-one@example.com - generic_nonmember_action: 1 http_etag: "..." include_rfc2369_headers: True join_address: test-one-join@example.com @@ -102,7 +101,6 @@ all the writable attributes in one request. ... welcome_message_uri='mailman:///welcome.txt', ... default_member_action='hold', ... default_nonmember_action='discard', - ... generic_nonmember_action=2, ... ), ... 'PUT') content-length: 0 @@ -182,7 +180,6 @@ must be included. It is an error to leave one or more out... ... welcome_message_uri='welcome message', ... default_member_action='accept', ... default_nonmember_action='accept', - ... generic_nonmember_action=2, ... ), ... 'PUT') Traceback (most recent call last): diff --git a/src/mailman/styles/default.py b/src/mailman/styles/default.py index e16b97547..7e7a6b354 100644 --- a/src/mailman/styles/default.py +++ b/src/mailman/styles/default.py @@ -126,7 +126,6 @@ from: .*@uplinkpro.com mlist.reject_these_nonmembers = [] mlist.discard_these_nonmembers = [] mlist.forward_auto_discards = True - mlist.generic_nonmember_action = 1 mlist.nonmember_rejection_notice = '' # Max autoresponses per day. A mapping between addresses and a # 2-tuple of the date of the last autoresponse and the number of |
