diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/bin/master.py | 8 | ||||
| -rw-r--r-- | src/mailman/database/factory.py | 8 | ||||
| -rw-r--r-- | src/mailman/database/postgresql.py | 5 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.rst | 2 | ||||
| -rw-r--r-- | src/mailman/docs/RELEASENOTES.rst | 4 | ||||
| -rw-r--r-- | src/mailman/utilities/importer.py | 3 |
6 files changed, 22 insertions, 8 deletions
diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index 968260595..ebf08ba11 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -45,6 +45,12 @@ LOCK_LIFETIME = timedelta(days=1, hours=6) SECONDS_IN_A_DAY = 86400 SUBPROC_START_WAIT = timedelta(seconds=20) +# Environment variables to forward into subprocesses. +PRESERVE_ENVS = ( + 'COVERAGE_PROCESS_START', + 'MAILMAN_EXTRA_TESTING_CFG', + ) + class ScriptOptions(Options): @@ -375,7 +381,7 @@ class Loop: env['MAILMAN_VAR_DIR'] = var_dir # For the testing framework, if these environment variables are set, # pass them on to the subprocess. - for envvar in ('COVERAGE_PROCESS_START', 'MAILMAN_EXTRA_TESTING_CFG'): + for envvar in PRESERVE_ENVS: if envvar in os.environ: env[envvar] = os.environ[envvar] args.append(env) diff --git a/src/mailman/database/factory.py b/src/mailman/database/factory.py index 29744ecc0..8b30b9417 100644 --- a/src/mailman/database/factory.py +++ b/src/mailman/database/factory.py @@ -136,11 +136,11 @@ class DatabaseTestingFactory: verifyObject(IDatabase, database) database.initialize() # Remove existing tables (PostgreSQL will keep them across runs) - tmpmd = MetaData(bind=database.engine) - tmpmd.reflect() - tmpmd.drop_all() + metadata = MetaData(bind=database.engine) + metadata.reflect() + metadata.drop_all() database.commit() - # Now create the current model without Alembic upgrades + # Now create the current model without Alembic upgrades. Model.metadata.create_all(database.engine) database.commit() # Make _reset() a bound method of the database instance. diff --git a/src/mailman/database/postgresql.py b/src/mailman/database/postgresql.py index e56ddaf38..ea6540721 100644 --- a/src/mailman/database/postgresql.py +++ b/src/mailman/database/postgresql.py @@ -44,8 +44,9 @@ class PostgreSQLDatabase(SABaseDatabase): # django-postgresql-how-to-reset-primary-key for table in tables: for column in table.primary_key: - if column.autoincrement and isinstance(column.type, Integer) \ - and not column.foreign_keys: + if (column.autoincrement + and isinstance(column.type, Integer) + and not column.foreign_keys): store.execute("""\ SELECT setval('"{0}_{1}_seq"', coalesce(max("{1}"), 1), max("{1}") IS NOT null) diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index 17d5bdc4b..74d124f4e 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -45,6 +45,8 @@ Bugs list itself is deleted. (LP: #1432239) * The built-in example ``IArchiver`` implementations now explicitly return None. (LP: #1203359) + * The test suite now runs successfully again with PostgreSQL. Given by + Aurélien Bompard. (LP: #1435941) Configuration ------------- diff --git a/src/mailman/docs/RELEASENOTES.rst b/src/mailman/docs/RELEASENOTES.rst index ca2a34eeb..9ccf379e6 100644 --- a/src/mailman/docs/RELEASENOTES.rst +++ b/src/mailman/docs/RELEASENOTES.rst @@ -21,3 +21,7 @@ Mailman 3 is not yet feature complete with Mailman 2.1. The documentation here describes the Mailman Core in great detail. Postorius, Hyperkitty, mailman.client, and the bundler are described and developed elsewhere. + +More release notes are maintained on the `Mailman wiki`_. + +.. _`Mailman wiki`: http://wiki.list.org/Mailman3 diff --git a/src/mailman/utilities/importer.py b/src/mailman/utilities/importer.py index c3d15fb27..b55d8c38d 100644 --- a/src/mailman/utilities/importer.py +++ b/src/mailman/utilities/importer.py @@ -152,7 +152,8 @@ enabled: yes -# Attributes in Mailman 2 which have a different type in Mailman 3. +# Attributes in Mailman 2 which have a different type in Mailman 3. Some +# types (e.g. bools) are autodetected from their SA column types. TYPES = dict( autorespond_owner=ResponseAction, autorespond_postings=ResponseAction, |
