summaryrefslogtreecommitdiff
path: root/src/mailman/commands
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'pluggable-workflows' into pluginpluginJ08nY2017-08-073-7/+7
|\
| * Migrate the [un]subscription_policy attribute.J08nY2017-08-073-7/+7
| | | | | | | | | | | | | | | | | | - This is quite a huge commit, since it changes the type of the MailingList.subscription_policy and unsubscription_policy attributes to the new names of pluggable workflows, in all occurences. - Also adds a migration to migrate the attributes to the new types. - Adds tests for the migration.
* | Add new logger which plugins can use.J08nY2017-08-071-0/+1
| |
* | Add per-plugin hooks, add docs about plugins.J08nY2017-08-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removes pre_hook, post_hook and ext_dir. With the latter being unused. Warns on startup if the hooks are present in config. - Adds IPlugin interface with pre_hook and post_hook methods. - Adds 'class' config parameter to plugins, which can be set to a class implementing the IPlugin interface, it will be initialized once on Mailman's startup, then before the DB setup the pre_hook will be run, after DB and other components the post_hook will be run. Plugin instances are stored in the config.plugins dict, with keys being their configuration section names.
* | Add pluggable components.J08nY2017-08-072-1/+1
|/ | | | | | | | | | | | | | | | | - Adds the notion of a 'plugin'. - A plugin has a package path and a flag specifying whether it's enabled or not. - Adds a find_pluggable_components function similar to the find_components one. This one dynamically searches not only the mailman package but all of plugins. - e.g. find_pluggable_components('rules', IRule) finds all IRule components in mailman.rules but also in example_plugin.rules for plugin names example_plugin. - Uses the find_pluggable_components function in place of find_components when searching for Rules, Handlers, Chains, EmailCommands, and Styles.
* Rename metadata key for clarityBarry Warsaw2017-08-041-1/+1
|
* Set a timeout on the lock acquisitionBarry Warsaw2017-07-271-1/+2
|
* Convert to click for CLI optionsBarry Warsaw2017-07-2251-2544/+2486
|
* Fix confirmation of unsubscription requests. (Closes: #294)Barry Warsaw2017-01-163-5/+34
|
* Bump up stale lock expiration date.Barry Warsaw2017-01-091-1/+1
| | | | | | Hopefully this will help fix intermittent failures on the Gitlab CI runners. 2 minutes appears to be too short since the MySQL tests can take longer than that to get to the lock claim attempt.
* Bump copyright years.Barry Warsaw2017-01-0431-31/+31
|
* Implement caching suffix list with in-tree fallback.Barry Warsaw2017-01-012-2/+2
| | | | | | | | Also: * Change doctest cleanups to be an ExitStack. * Added [dmarc]cache_lifetime setting. * Cleanup pass through dmarc-mitigation.rst. * Be sure the cached org domain file is cleaned up when the world is reset.
* Prevent the occasional CI/testsuite hang.Barry Warsaw2016-12-031-3/+55
| | | | | | This doesn't solve the underlying problem of why child processes (both runners and master) occasionally don't exit, but it prevents ugly timeouts in the CI infrastructure when that happens.
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-2920-20/+20
|
* Fix the Flake8 ignore tagsAurélien Bompard2016-11-211-1/+1
|
* Fix doctests to properly set unsubscription_policy = SubscriptionPolicy.openMark Sapiro2016-10-251-0/+1
| | | | where needed.
* 100% diffcovBarry Warsaw2016-10-211-0/+54
|
* Simplify the implementation.Barry Warsaw2016-10-173-12/+10
| | | | | | | | | | | | | | | | | | | | | | This merges the SubscriptionManager and UnsubscriptionManager into a single SubscriptionManager implementation that handles both register() and unregister(). This allows us to use direct class-based adaptation instead of the more clunky getAdapter() API. We can also eliminate the funky _get_workflow() implementation detail. This has a couple of side-effects. .confirm() must lookup the token in the pendings database and pull out the pending type, dispatching to the proper class depending on the type, or raising a LookupError if the token is None or there is no pendable associated with the given token. This feels like an acceptable trade-off. However, this *also* means that IWorkflowStateManager must lose its 'name' argument in its methods. That's because we won't actually know the name until its too late. Honestly, the name wasn't providing much value anyway (it was always the subclass's name), so losing that seems fine too. The complication here is that the name was a primary key in the 'workflowstate' table, so we need to add its removal in the database migration.
* Merge branch 'master' into issue213.Barry Warsaw2016-10-161-2/+2
|\
| * Fixes ipython singleton class 'InteractiveShellEmbed' initializationamitt0012016-10-101-2/+2
| |
* | Another fix.Barry Warsaw2016-09-161-4/+5
| |
* | Fix test.Barry Warsaw2016-09-131-4/+4
| |
* | Split registration (subscription) and unsubscription:Barry Warsaw2016-09-131-4/+13
| | | | | | | | | | | | | | | | * events * notices * handlers Also, be sure to do only one `leave` command per email.
* | Fix more tests.Barry Warsaw2016-09-112-7/+12
| |
* | IWorkflowManager -> ISubscriptionManagerBarry Warsaw2016-09-013-12/+11
| |
* | CheckpointingBarry Warsaw2016-09-012-6/+6
| |
* | Intermediate CommitAbhilash Raj2016-09-013-15/+21
|/
* Reorganize the documentation for better accesibilityAbhilash Raj2016-08-211-0/+8
|
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-288-10/+10
|
* New template system. Closes #249Barry Warsaw2016-07-164-23/+15
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Pay down some minor tech-debt.Barry Warsaw2016-05-011-2/+2
|
* Use contextlib.suppress() where appropriate.Barry Warsaw2016-04-302-17/+5
|
* Skip a test if readline isn't available.Barry Warsaw2016-04-291-0/+7
| | | | Closes #230
* Add some documentation.Barry Warsaw2016-04-231-15/+38
|
* Fix #228Barry Warsaw2016-04-223-7/+112
| | | | | | | | ``mailman shell`` now supports readline history if you set the ``[shell]history_file`` variable in mailman.cfg. Also, many useful names are pre-populated in the namespace of the shell. (Closes: #228) With test coverage.
* mailman subcommands commit transactionsBarry Warsaw2016-04-122-2/+52
| | | | | | Closes #223 Also: `mailman digests` has grown --verbose and -dry-run options.
* Fix compatibility with IPython 4.Barry Warsaw2016-04-101-8/+43
|
* Fix regression with default banner.Barry Warsaw2016-04-091-1/+2
| | | | Closes #225
* Use flake8-respect-noqa plugin and fix more complaints.Barry Warsaw2016-04-011-5/+5
|
* Don't use `flake8: noqa`.Barry Warsaw2016-04-017-10/+9
| | | | | | | This suppresses all errors in the file. Use `noqa`, although pep8 doesn't honor this for all errors. There may be a plugin which helps.
* Import order flake8 plugin.Barry Warsaw2016-03-272-3/+3
| | | | Fix lots of import order errors discovered by the new plugin.
* Clean up the commands subdirectory.Barry Warsaw2016-03-2429-300/+117
|
* A bit of pre-merge cleanup.Barry Warsaw2016-03-223-27/+36
| | | | | | | | | | | * Reorder some add_argument() parameters. * Reword some help text. * Reword some of the doctest language. * Clean up whitespace. * Minor coding style change in unittests. * Add another unittest. * Fix a docstring (not related to these change). * Add NEWS.
* Changed domain creation to True as defaultGurkirpal2016-03-223-6/+39
| | | | | | Added tests for domain option Updated docs for creating list from shell
* Refactor API differences into a separate class.Barry Warsaw2016-01-131-4/+3
| | | | | | | | | | | We now have an IAPI interface which defines methods to convert to/from UUIDs to their REST representations, and to calculate the API-homed full URL path to a resource. Add implementations API30 and API31 to handle the two different implementations so far. This also simplifies the various path_to() calls. Also: Add support for diff_cover to tox.ini to check that all differences against the master branch have full test coverage.
* Additional refactoring to use the QuerySequence wrapper, so that we can stillBarry Warsaw2016-01-061-1/+1
| | | | | | use len() and slicing on SQLAlchemy query results. We also don't need to list()-ify the results in the tests. This isn't perfect, but at least it doesn't introduce yet another layer violation.
* Make the members request pageableAurélien Bompard2016-01-061-1/+1
|
* Happy New Year.Barry Warsaw2016-01-0229-29/+29
|
* The ``mailman members`` command can now be used to display members based onBarry Warsaw2015-12-223-85/+266
| | | | | subscription roles. Also, the positional "list" argument can now accept list names or list-ids.
* Expose the "bump digest" and "send digest" functionality though the REST APIBarry Warsaw2015-12-221-1/+1
| | | | | | | via the ``<api>/lists/<list-id>/digest`` end-point. GETting this resource returns the ``next_digest_number`` and ``volume`` as the same values accessible through the list's configuraiton resource. POSTing to the resource with either ``send=True``, ``bump=True``, or both invokes the given action.