summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces
Commit message (Collapse)AuthorAgeFilesLines
...
| * | add tests, fix docs, remove contact_addressAbhilash Raj2015-03-281-8/+5
| | |
* | | * Refactor add_member() so that it uses a RequestRecord namedtuple.Barry Warsaw2015-03-212-0/+32
|/ / | | | | | | | | | | * RequestRecord contains no password key so these are not part of the held requests database any more. * Pending record contains `email` now instead of `address`.
| * Fix some typos.Barry Warsaw2015-03-301-2/+2
| |
| * Refactorings and tests.Barry Warsaw2015-03-291-11/+7
| | | | | | | | | | | | | | | | * Move the basic Workflow class to a module in mailman.app. * Rename the interface and model modules. * Update the configure.zcml. * Minor style fixes. * Add a test for the workflow model.
| * Save the workflow state in the databaseAurélien Bompard2015-03-251-1/+29
| |
| * Add a table to store workflow statesAurélien Bompard2015-03-251-0/+42
| |
| * Resurrect Barry's subpolicy branch (lp:~barry/mailman/subpolicy)Aurélien Bompard2015-03-203-0/+48
|/
* Bump copyright years.Barry Warsaw2015-01-0439-39/+39
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-2239-131/+9
|
* DatabaseBarry Warsaw2014-11-014-18/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------- * The ORM layer, previously implemented with Storm, has been replaced by SQLAlchemy, thanks to the fantastic work by Abhilash Raj and Aurélien Bompard. Alembic is now used for all database schema migrations. * The new logger `mailman.database` logs any errors at the database layer. API --- * Several changes to the internal API: - `IListManager.mailing_lists` is guaranteed to be sorted in List-ID order. - `IDomains.mailing_lists` is guaranteed to be sorted in List-ID order. - Iteration over domains via the `IDomainManager` is guaranteed to be sorted by `IDomain.mail_host` order. - `ITemporaryDatabase` interface and all implementations are removed.
| * Merge in the last of Aurelien's changes, and make the test suite pass withBarry Warsaw2014-10-311-1/+4
| | | | | | | | PostgreSQL.
| * Merge abompard's fixes to the Postgres test suite.Barry Warsaw2014-10-302-2/+6
| |
| * Since we don't have migrations, we don't need the ITemporaryDatabase stuff,Barry Warsaw2014-09-231-6/+0
| | | | | | | | | | nor do we need the TAG mechanism. We also don't need load_sql() or load_migrations().
| * Pass all tests with PYTHONWARNINGS=error.Barry Warsaw2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | * Switch away from a deprecated unittest method. * Switch away from using deprecated Exceptions.message attribute. * Decode the bytes b32 encoded X-Message-ID-Hash header into a Unicode. * Fix a rather glaring bug in Pendings.add() where we were actually not properly coercing bytes to unicode for the keys and values! I guess it's a good thing that SQLAlchemy is more strict than Storm. * Some cosmetic fixes.
| * Clean up pass.Barry Warsaw2014-09-221-1/+1
| |
| * * change declarative_base class to use ModelMeta classAbhilash Raj2014-09-061-1/+1
|/ | | | * update some queries to match SA style
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-2828-28/+28
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Trunk mergeBarry Warsaw2014-04-1439-43/+105
|\
| * Several internal improvements:Barry Warsaw2014-01-061-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New events: - ConfirmationNeededEvent is triggered when a pendable requiring confirmation is created. This allows us to define an event handler for this event which sends the user notification. - SubscriptionEvent is triggered when a member is added to a mailing list. This lets us define an event handler which sends the welcome message. * send_welcome_message() now takes a member parameter instead of an address, which lets us directly access the member's delivery mode and user display name (if the member has a user, which it might not in some cases). * Use the list id in the pendable record instead of the list name for robustness (the latter can change but the former is permanent). * Test more registration conditions. * In the bin/runner command line switch handling, default `verbose` to None instead of False. This makes it work better with nose's -E switch (log to stderr). * In call_api(), if a POST, PUT, or PATCH method is used and data is None, encode the empty dictionary; seems like the behavior of urlencode() has changed, so this is safer. * Fix style and pyflakes warnings.
| * Bump copyright years.Barry Warsaw2014-01-0139-39/+39
| |
| * Checkpointing.Barry Warsaw2013-11-253-15/+42
| |
| * Joanna's branchBarry Warsaw2013-10-271-0/+11
| |\
| | * Changes for enabling/disabling archivers.Joanna Skrzeszewska2013-09-081-0/+11
| | |
* | | Aurélien Bompard's import-from-2.1 branch, with cleanup and fixes.Barry Warsaw2014-04-142-2/+3
|\ \ \ | |/ / |/| / | |/
* | trunk mergeBarry Warsaw2013-09-0112-12/+12
|\|
| * Switch to PEP 435 enums from flufl.enums.Barry Warsaw2013-06-1812-12/+12
| |
* | Migrate bounceevent.list_name -> bounceevent.list_idBarry Warsaw2013-09-011-2/+2
|/ | | | | | | * Rename StormBaseDatabase._create() -> .initialize() * Refactor database initialization. * make_listid() helper. * Add a pivot() helper for schema migrations.
* * `bin/runner` command has been simplified and its command line optionsBarry Warsaw2013-06-171-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | reduced. Now, only one `-r/--runner` option may be provided and the round-robin feature has been removed. * Fixed REST server crash on `reopen` command. Identification and test provided by Aurélien Bompard. (LP: #1184376) Also: * bin/runner now uses standard argparse instead of ScriptOptions. * The entire bin/runner machinery has bee reorganized and simplified. There * is no more Loop class. Signal setting is moved directly into the base Runner class and overrided in specific subclasses (e.g. RESTRunner which must cleanly shutdown its TCPServer). The runner exit status is now set directly on the Runner instance. * Fixed a few minor style issues. * In order to cleanly shutdown the RESTRunner's WSGI server, we must start a subthread which only watches for an Event and then calls the server's shutdown() method. It has to be this way because the WSGI server itself (due to interactions with SQLite), and the signal handlers (due to Python's signal handling semantics) must both run in the main thread. However, the shutdown() must be invoked from a subthread in order to prevent deadlock. * Refactor the RESTLayer to eliminate duplication of code.
* * Add `subject_prefix` to the `IMailingList` interface, and clarify theBarry Warsaw2013-05-301-1/+13
| | | | docstring for `display_name`. (LP: #1181498)
* add commentBarry Warsaw2013-05-301-0/+2
|
* PEP 435 enums won't allow extensibility through inheritance.Barry Warsaw2013-05-021-1/+6
|
* * Non-queue runners should not create ``var/queue`` subdirectories. Fixed byBarry Warsaw2013-01-201-0/+4
|\ | | | | | | Sandesh Kumar Agrawal. (LP: #1095422)
| * Test added to non_queue_runner bugSandesh Kumar Agrawal2013-01-171-0/+4
|/
* Bump copyright years.Barry Warsaw2013-01-0139-39/+39
|
* Revert the addition of the mailinglist.style_name column, as well as theBarry Warsaw2012-12-291-3/+0
| | | | | | | | | | | | 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.
* LP: #975692 phase 1Barry Warsaw2012-12-282-40/+11
| | | | | | | | | | | | | | | | | * Rework list style management. No more style priorities or matching.. Now, you name a style explicitly to apply and that's it. * create_list() now takes a `style` argument. * config file now names both a default style to use, and a set of paths to scan for IStyle instances. (This could be a model for other plugins.) * added IMailingList.style_name to record the last style applied, but this is going to be removed in subsequent revisions. Also: * Move find_components() and scan_module() from app/finder.py to utilities/modules.py * Cleaned up lifecycle.rst for better documentation. Some tests moved to test_lifecycle.py. * Remove some unnecessary test tearDown() code.
* * Two new events are triggered on membership changes: `SubscriptionEvent`Barry Warsaw2012-12-231-0/+31
| | | | | when a new member joins a mailing list, and an `UnsubscriptionEvent` when a member leaves a mailing list. (LP: #1047286)
* ConfigurationBarry Warsaw2012-11-041-0/+11
| | | | | | | | | | | | | | | ------------- * `[passlib]path` configuration variable renamed to `[passlib]configuration`. * Postfix-specific configurations in the `[mta]` section are moved to a separate file, named by the `[mta]configuration` variable. * In the new `postfix.cfg` file, `postfix_map_cmd` is renamed to `postmap_command`. Also: * More Python 2.7-isms, use assertMultiLineEqual() directly. * Added external_configuration() and load_external() to mailman.config.config * ConfigLayer does a blanket set of [postfix]postmap_command so subtests generally won't have to.
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-311-5/+1
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* DatabaseBarry Warsaw2012-10-161-25/+17
| | | | | | | | | | | | -------- * The `ban` table now uses list-ids to cross-reference the mailing list, since these cannot change even if the mailing list is moved or renamed. Interfaces ---------- * The `IBanManager` is no longer a global utility. Instead, you adapt an `IMailingList` to an `IBanManager` to manage the bans for a specific mailing list. To manage the global bans, adapt ``None``.
* * Added support for Postfix `relay_domains` setting for better virtual domainBarry Warsaw2012-10-121-4/+4
| | | | | | | | support. Contributed by Jimmy Bergman. * `bin/mailman aliases` loses the `--output`, `--format`, and `--simple` arguments, and adds a `--directory` argument. This is necessary to support the Postfix `relay_domains` support.
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-044-14/+35
| | | | | | | | | | | | | | | now via the RFC 2369 `list_id` instead of the fqdn listname (i.e. posting address). This is because while the posting address can change if the mailing list is moved to a new server, the list id is fixed. (LP: #1024509) + IListManager.get_by_list_id() added. + IListManager.list_ids added. + IMailingList.list_id added. + Several internal APIs that accepted fqdn list names now require list ids, e.g. ISubscriptionService.join() and .find_members(). + IMember.list_id attribute added; .mailing_list is now an alias that retrieves and returns the IMailingList. - list_id added (LP: #1024509)
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-264-13/+54
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ArchivePolicy. This describes the three states of never archive, archive privately, and archive_publicly. (LP: #967238) Database -------- * Schema migrations (LP: #971013) - include_list_post_header -> allow_list_posts - news_prefix_subject_too -> nntp_prefix_subject_too - news_moderation -> newsgroup_moderation - archive and archive_private have been collapsed into archive_policy. - nntp_host has been removed. * The PostgreSQL port of the schema accidentally added a moderation_callback column to the mailinglist table. Since this is unused in Mailman, it was simply commented out of the base schema for PostgreSQL.
| * Working for SQLite:Barry Warsaw2012-07-251-3/+7
| | | | | | | | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
| * The final bit of refactoring puts the specifics of making a temporary databaseBarry Warsaw2012-07-251-13/+6
| | | | | | | | into the hands of the database modules, by using ZCA adapters.
| * Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-251-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | production database. - Add an IDatabaseFactory interface with two named utility implementations. The initialization subsystem will either ask for the 'testing' or 'production' factory utility depending on whether we're in the test suite or not. The testing factory returns an IDatabase that can be _reset(). - initialize_2() now takes an optional `testing` argument, defaulting to False. The test ConfigLayer will pass in True. - Remove _reset() from the base database class. - The ModelMeta now adds a PRESERVE attribute to database classes. This defaults to False, meaning by default the test framework will reset the table. The Version table is preserved because it records the schema migrations. - Because of the above, we no longer need to support pre_reset() and post_reset() on migrations. Also, bin/mailman should allow the standard configuration file search algorithm to be used except when -C/--config is given.
| * Checkpointing Postgres port of test suite.Barry Warsaw2012-07-231-0/+13
| | | | | | | | | | | | | | | | | | - Refactor load_schema() into a separate load_sql() method. - Add API for test suite to make a temporary database. - Add code to migrate the PostgreSQL database. - Comment out `moderation_callback` from the PostgreSQL SQL; this must have snuck in accidentally via the contributed port. - Refactor test_migrations.py
| * trunk mergeBarry Warsaw2012-07-064-2/+96
| |\ | |/ |/|
* | * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-022-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default hash is `sha512_crypt`. * Events renamed and moved: * `mailman.chains.accept.AcceptNotification` * `mailman.chains.base.ChainNotification` * `mailman.chains.discard.DiscardNotification` * `mailman.chains.hold.HoldNotification` * `mailman.chains.owner.OwnerNotification` * `mailman.chains.reject.RejectNotification` changed to (respectively): * `mailman.interfaces.chains.AcceptEvent` * `mailman.interfaces.chains.ChainEvent` * `mailman.interfaces.chains.DiscardEvent` * `mailman.interfaces.chains.HoldEvent` * `mailman.interfaces.chains.AcceptOwnerEvent` * `mailman.interfaces.chains.RejectEvent` * A `ConfigurationUpdatedEvent` is triggered when the system-wide global configuration stack is pushed or popped. * With the switch to `passlib`_, `[passwords]password_scheme` has been removed. Instead use `[passwords]path` to specify where to find the `passlib.cfg` file. See the comments in `schema.cfg` for details.
* | * When a queue runner gets an exception in its _dispose() method, aBarry Warsaw2012-05-111-0/+13
| | | | | | | | | | | | `RunnerCrashEvent` is triggered, which contains references to the queue runner, mailing list, message, metadata, and exception. Interested parties can subscribe to that `zope.event` for notification.