summaryrefslogtreecommitdiff
path: root/src/mailman/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* We don't need the 'six' package any more.Barry Warsaw2015-01-042-10/+9
|
* Bump copyright years.Barry Warsaw2015-01-0413-13/+13
|
* Merge the Python 3 branch.Barry Warsaw2015-01-0414-100/+64
|\
| * Even if we're not loading a user-defined mailman.cfg file (i.e. the user ranBarry Warsaw2015-01-021-5/+6
| | | | | | | | | | | | | | `mailman info` after first install and we're creating the var dir), we still need to post-process so we get the UPPERCASE_DIR variables. Fix an UnboundNameError in the error printing.
| * Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-2213-65/+18
| |
| * Trunk merge.Barry Warsaw2014-12-221-2/+38
| |\
| * | Don't propagate flufl.lock logger to its root, which prevents test suite spewBarry Warsaw2014-12-211-0/+3
| | | | | | | | | | | | to the console.
| * | Refactor subject-prefix handler out of cook-headers handler and make all testsBarry Warsaw2014-12-211-0/+1
| | | | | | | | | | | | pass.
| * | Core tests pass.Barry Warsaw2014-12-152-3/+3
| | |
| * | Use listid instead of (fqdn) listname in the metadata pickle.Barry Warsaw2014-12-154-8/+18
| | | | | | | | | | | | | | | | | | load_external() now always opens in utf-8 mode. More test repair.
| * | * Read the .cfg files not as bytes any more, but as UTF-8 encoding files.Barry Warsaw2014-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert LP: #1170347 to not .as_string() the message being added the mailbox, because Python 3.4 handles this properly by default. Fix up some lmtp code, though I don't thinkk it's quite right yet. Fix handler tests.
| * | Port model/tests/test_user.pyBarry Warsaw2014-12-011-7/+6
| | |
| * | Checkpointing.Barry Warsaw2014-11-303-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using `six` I think I have most of the imports squared away. There's probably still uses of `unicode` built-ins that need fixing. The idea is to first get the test suite running (which it doesn't yet), and then to fix tests. There's a bug in lazr.config which requires us to patch it for now.
* | | It's possible $HOME isn't defined.Barry Warsaw2015-01-011-1/+1
| | |
* | | Back port from py3 branch:Barry Warsaw2014-12-291-0/+3
| |/ |/| | | | | | | # Explicitly prevent flufl.lock from propagating its log messages # to its root logger, i.e. the console.
* | LP: #1130696 - AttributeError on .senderBarry Warsaw2014-12-101-2/+38
|\ \ | |/ |/|
| * Make the MIMEDigester generate a subclass of MIMEMultipart with our additionsAurélien Bompard2014-12-092-11/+13
| | | | | | | | Fixes bug #1130696 (differently)
| * Handle the MIMEMultipart created by the DigestRunner properlyAurélien Bompard2014-11-302-2/+21
|/ | | | Fixes: bug #1130696
* Fix a few issues with `python2 -3` compatibility.Barry Warsaw2014-11-191-2/+2
|
* * You no longer have to edit `src/mailman/testing/testing.cfg` to run theBarry Warsaw2014-11-091-0/+8
| | | | | | | | | | | test suite against PostgreSQL. See `src/mailman/docs/START.rst` for details. Also: * Test fixes. * Doc fixes. * PostgreSQL/model fixes.
* DatabaseBarry Warsaw2014-11-012-22/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------- * 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-0/+4
| | | | | | | | PostgreSQL.
| * Add the [logging.database] section and use it to configure the SQLAlchemy andBarry Warsaw2014-10-121-19/+30
|/ | | | Alembic loggers.
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-287-10/+10
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Several internal improvements:Barry Warsaw2014-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | * 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-0113-13/+13
|
* * When --sort is used, watch out for continuation lines, which shouldn't getBarry Warsaw2013-10-181-2/+1
| | | | | | sorted. * Fix stderr output in sub-runners, and move the -e test option to -E.
* * `bin/runner` command has been simplified and its command line optionsBarry Warsaw2013-06-171-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* - Write ./var/etc/mailman.cfg if it doesn't already exist.Barry Warsaw2013-03-201-1/+7
| | | | | | | - Use ./var/etc/mailman.cfg if it exists, just after ./mailman.cfg and just before ~/.mailman.cfg. - Add link to FHS - Whitespace normalization.
* * Non-queue runners should not create ``var/queue`` subdirectories. Fixed byBarry Warsaw2013-01-202-7/+17
|\ | | | | | | Sandesh Kumar Agrawal. (LP: #1095422)
| * changeSandesh Kumar Agrawal2013-01-171-1/+0
| |
| * Comment fixedSandesh Kumar Agrawal2013-01-171-1/+1
| |
| * Test added to non_queue_runner bugSandesh Kumar Agrawal2013-01-172-14/+16
| |
| * Fixed formation of /var/queue/* for non-queue runnersSandesh Kumar Agrawal2013-01-111-7/+6
| |
| * non-queue runner should not create var/tmp/* directorySandesh Kumar Agrawal2013-01-101-7/+16
|/
* Bump copyright years.Barry Warsaw2013-01-0113-13/+13
|
* LP: #975692 phase 1Barry Warsaw2012-12-283-3/+4
| | | | | | | | | | | | | | | | | * 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.
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-313-3/+9
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* * You can now PUT and PATCH on user resources to change the user's displayBarry Warsaw2012-09-221-0/+22
| | | | | | | | | | | | | | name or password. For passwords, you pass in the clear text password and Mailman will hash it before storing. Also: * Major refactoring of validators for PUT and PATCH. Pull the common logic out of configuration.py and put it in a PatchValidator class in helpers.py. Also move GetterSetter to helpers.py * Add new exception classes RESTError, UnknownPATCHRequestError, ReadOnlyPATCHRequestError. These are used in the PatchValidator. * Added Validator.update() which works nicely for PATCH and PUT.
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-261-9/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-251-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * trunk mergeBarry Warsaw2012-07-069-39/+147
| |\ | |/ |/|
* | More consistency in the way post-configuration changes are processed. LessBarry Warsaw2012-07-023-17/+27
| | | | | | | | | | | | | | | | | | | | magic in the _post_process() method, more ConfigurationUpdatedEvents. More centralization of event initialization. Added property Configuration.language_configs. Instead of initializing events in initialize_2(), initialize them in initialize_1() and do it before the configuration is loaded.
* | * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add a test to ensure that the re-raising of the exception occurs.Barry Warsaw2012-05-111-3/+7
| |
* | * When a queue runner gets an exception in its _dispose() method, aBarry Warsaw2012-05-112-2/+93
| | | | | | | | | | | | `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.
* | General code cleanup.Barry Warsaw2012-04-256-22/+21
| | | | | | | | | | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
| * - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-081-0/+3
|/ | | | | | | | | | | | | | | can be tested separately. - Add an `until` argument to load_migrations() so that we can load only up to a given timestamp. - In load_migrations(), ignore files in which the `version` part of the file name is empty. - In migrations.rst, use the new, better way of ensuring post-test cleanup. - Add tests for partial upgrades. - LP: #971013 - schema migrations for beta 2. - LP: #967238 - IMailingList.archive + IMailingList.archive_private -> IMailingList.archive_policy, and add ArchivePolicy enum. - Move the `chdir` context manager to helpers.py and add `temporary_db` context manager.
* ArchitectureBarry Warsaw2012-03-261-2/+1
| | | | | | | | | | | | | | | | | | | ------------ * Internally, all datetimes are kept in the UTC timezone, however because of LP: #280708, they are stored in the database in naive format. * `received_time` is now added to the message metadata by the LMTP runner instead of by `Switchboard.enqueue()`. This latter no longer depends on `received_time` in the metadata. * The `ArchiveRunner` no longer acquires a lock before it calls the individual archiver implementations, since not all of them need a lock. If they do, the implementations must acquire said lock themselves. Configuration ------------- * New configuration variables `clobber_date` and `clobber_skew` supported in every `[archiver.<name>]` section. These are used to determine under what circumstances a message destined for a specific archiver should have its `Date:` header clobbered.
* Add the OwnerPipeline, with tests, and rename some things for consistency.Barry Warsaw2012-03-232-7/+68
|