From 232dda432a0033f1857dbe4f1957ad29c498ba53 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 29 Dec 2012 23:31:50 -0500 Subject: [PATCH] Revert the addition of the mailinglist.style_name column, as well as the IMailingList.style_name attribute. The problem is, there's nothing to guarantee that only one style will get run, and there's no sense in keeping track of the last style applied. Also: * Remove ListManager.create()'s setting of .personalize and .display_name. These should be left to the styles. (There's no reason why only these two would be set here.) * Fix some typos. --- src/mailman/database/schema/mm_20121015000000.py | 1 - .../database/schema/sqlite_20121015000000_01.sql | 1 - src/mailman/database/tests/test_migrations.py | 10 +-------- src/mailman/docs/NEWS.rst | 5 ++++- src/mailman/interfaces/mailinglist.py | 3 --- src/mailman/model/mailinglist.py | 7 +++--- src/mailman/styles/default.py | 1 - src/mailman/styles/docs/styles.rst | 26 +++++++++------------- 8 files changed, 18 insertions(+), 36 deletions(-) diff --git a/src/mailman/database/schema/mm_20121015000000.py b/src/mailman/database/schema/mm_20121015000000.py index bfbf5cb62..7ccf93289 100644 --- a/src/mailman/database/schema/mm_20121015000000.py +++ b/src/mailman/database/schema/mm_20121015000000.py @@ -87,6 +87,5 @@ def upgrade_postgres(database, store, version, module_path): WHERE id = {1}; """.format(_make_listid(mailing_list), id)) store.execute('ALTER TABLE ban DROP COLUMN mailing_list;') - store.execute('ALTER TABLE mailinglist ADD COLUMN style_name;') # Record the migration in the version table. database.load_schema(store, version, None, module_path) diff --git a/src/mailman/database/schema/sqlite_20121015000000_01.sql b/src/mailman/database/schema/sqlite_20121015000000_01.sql index e9e3661e0..c0df75111 100644 --- a/src/mailman/database/schema/sqlite_20121015000000_01.sql +++ b/src/mailman/database/schema/sqlite_20121015000000_01.sql @@ -20,4 +20,3 @@ INSERT INTO ban_backup SELECT FROM ban; ALTER TABLE ban_backup ADD COLUMN list_id TEXT; -ALTER TABLE mailinglist ADD COLUMN style_name TEXT; diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py index e813d4341..6d27f01f0 100644 --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -375,10 +375,6 @@ class TestMigration20121015Schema(MigrationTestBase): ['20121014999999'], ('list_id',), ('mailing_list',)) - self._missing_present('mailinglist', - ['20121014999999'], - ('style_name',), - ()) def test_post_upgrade_column_migrations(self): self._missing_present('ban', @@ -386,13 +382,9 @@ class TestMigration20121015Schema(MigrationTestBase): '20121015000000'], ('mailing_list',), ('list_id',)) - self._missing_present('mailinglist', - ['20121014999999', - '20121015000000'], - (), - ('style_name',)) + class TestMigration20121015MigratedData(MigrationTestBase): """Test non-migrated data.""" diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index aad8f37ff..a9a238f3c 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -14,7 +14,7 @@ Here is a history of user visible changes to Mailman. Compatibility ------------- - * Python 2.7 is not required. Python 2.6 is no longer officially supported. + * Python 2.7 is now required. Python 2.6 is no longer officially supported. The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. (LP: #1073506) @@ -33,6 +33,9 @@ REST - `_mod_sender` -> `sender` - `_mod_message_id` -> `message_id` + * List styles are supported through the REST API. Get the list of available + styles (by name) via `.../lists/styles`. Create a list in a specific style + by using POST data `style_name=