summaryrefslogtreecommitdiff
path: root/src/mailman/database (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * Get test suite completely working:Barry Warsaw2012-07-205-53/+70
| | | | | | | | | | | | | | - migrations.rst needs to handle new standard migration - Add ResetHelper() to refactor out common migration test cooperation. - Handle temporary database. - Fix some attribute names.
| * trunk mergeBarry Warsaw2012-06-032-18/+43
| |\ | |/ |/|
| * Separate out the migration test methods so that the ones testing that theBarry Warsaw2012-04-204-23/+39
| | | | | | | | | | | | | | | | columns got renamed don't in fact check the data in those tables. Better separation of concerns. Rename mailman.database.transaction.txn to ...transactional and use it in a couple of additional spots.
| * newsgroup_moderationBarry Warsaw2012-04-082-1/+8
| |
| * - Rename the model attributes.Barry Warsaw2012-04-083-15/+14
| | | | | | | | - news_moderation -> newsgroup_moderation
| * - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-087-9/+494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | General code cleanup.Barry Warsaw2012-04-251-5/+4
| | | | | | | | | | | | | | | | - 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.
* | - Simplify the transactional() decorator.Barry Warsaw2012-04-221-13/+39
| | | | | | | | | | - Add transaction() context manager. - Add dbconnection() decorator.
* | Rename mailman.database.transaction.txn to ...transactional. Modernize theBarry Warsaw2012-04-201-3/+3
|/ | | | module, and use it in another convenient place.
* Add an owner chain and pipeline to the schema, model, and interface. PlumbBarry Warsaw2012-03-222-0/+4
| | | | this through the incoming runner.
* Merge the Pipermail eradication branch. The scrubber is also removed.Barry Warsaw2012-03-172-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
| * * Pipermail has been eradicated.Barry Warsaw2012-03-162-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
* | Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-152-6/+6
|/ | | | | | | | | | | "display_name" across the board. * `IMailingList.real_name` -> `IMailingList.display_name` * `IUser.real_name` -> `IUser.display_name` * `IAddress.real_name` -> `IAddress.display_name` * Schema changes: - real_name -> display_name (mailinglist, user, address)
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-072-4/+4
| | | | | | | | | | | postings go through the `posting_chain` while messages to owners to through `owners_chain`. The default `built-in` chain is renamed to `default-posting-chain` while the `built-in` pipeline is renamed `default-posting-pipeline`. * Schema changes: - start_chain -> posting_chain - pipeline -> posting_pipeline
* Reserve the mm_ prefix for MailmanBarry Warsaw2012-03-052-5/+6
|
* Template indirection now also in effect for regular and digest headers andBarry Warsaw2012-03-042-8/+8
| | | | | | | | | | | | footers, using the same semantics and algorithm as for welcome and goodbye messages. Additional schema changes: - msg_header -> header_uri - msg_footer -> footer_uri - digest_header -> digest_header_uri - digest_footer -> digest_footer_uri
* * Support downloading templates by URI, including mailman:// URIs. This isBarry Warsaw2012-03-032-8/+8
| | | | | | | | | | | | | used in welcome and goodbye messages, and supports both language and mailing list specifications. E.g. mailman:///test@example.com/it/welc.txt * Schema changes: - welcome_msg -> welcome_message_uri - goodbye_msg -> goodbye_message_uri - send_welcome_msg -> send_welcome_message - send_goodbye_msg -> send_goodbye_message * New `ITemplateLoader` utility.
* * Schema migrations have been implemented.Barry Warsaw2012-02-1210-44/+307
|
* copybumpBarry Warsaw2012-01-016-6/+6
|
* * Stop adding the X-BeenThere header.Barry Warsaw2011-11-062-2/+0
| | | | | | | * Separate out the RFC 2369 header adding handler. * Dynamically calculate the `List-Id` header instead of storing it in the database. This means it cannot be changed. * Be sure to clean out any digest .mmdf files when the world is reset.
* * Fix a couple of spelling errors.Barry Warsaw2011-11-022-14/+23
| | | | | | * Code cleanup (<> -> != ... sigh) * Minor refactoring of database setup code so that touch() is moved to the SQLiteDatabase class; it's not relevant for PostgreSQL.
* Add database specific pre- and post- reset callbacks. Use this to implementBarry Warsaw2011-10-233-1/+42
| | | | primary key reset for PostgreSQL, fixing several tests.
* digest_size_thresholds should be floats. This still doesn't work inBarry Warsaw2011-10-222-2/+2
| | | | PostgreSQL.
* - Be a little more careful about preparing the SQL statements for executionBarry Warsaw2011-10-222-5/+14
| | | | | | in the database, namely strip out empty lines and comments first, otherwise PostgreSQL spews "empty statement" errors at us. - Down to 4 test failures.
* - Ensure that class removal is deterministic.Barry Warsaw2011-10-222-28/+49
| | | | | | - Comment out a few more foreign key constraints since they break the tests. - Enable the PostgreSQLDatabase for testing (this one should not be committed on trunk.
* Merge PostgreSQL support from Stephen A. Goss, with refactoring by Barry. LP:Barry Warsaw2011-10-226-15/+455
|\ | | | | | | #860159.
| * LP: #860159 (experimental) PostgreSQL supportStephen A. Goss2011-09-262-4/+344
| |
* | * Build the Sphinx documentation with `python setup.py build_sphinx` insteadBarry Warsaw2011-10-051-0/+2
|/ | | | | of bin/docs from buildout. * Ensure foreign_keys are ON (probably unnecessary).
* Improved the way flufl.enum.Enums are stored in the database. Now, theyBarry Warsaw2011-09-232-23/+23
| | | | | | | | should always be stored as INTEGER columns, with the enum class explicitly described in the code. This should be more efficient, and besides EIBTI. Also, filled in a few additional IMailingList attributes which were not documented in the interface.
* Rename IDomain.email_host to .mail_host for consistency. Similarly in theBarry Warsaw2011-08-221-1/+1
| | | | REST API. (LP: #831660)
* * The IMailingList attribute ``host_name`` has been renamed to ``mail_host``Barry Warsaw2011-06-161-1/+1
| | | | | for consistency. This changes the REST API for mailing list resources. (LP: #787599)
* * bounce_processing -> process_bouncesBarry Warsaw2011-05-271-1/+1
| | | | | * Finally get rid of BounceMixin * Test the simple case where the mailing list does no bounce processing.
* * bounce_unrecognized_goes_to_list_owner -> forward_unrecognized_bounces_to Barry Warsaw2011-05-251-1/+1
| | | | | | | | | | | | * Add an additional option for unrecognized bounce disposition: send it to the site administrators. * Move maybe_forward() from src/mailman/queue/bounce.py to src/mailman/app/bounces.py, refactor and add tests. * Add a LogFileMark class to help with tests that want to check the output to a log file. * OwnerNotification gets a better signature. Instead of tomoderators, the last argument is a roster to send the notification to. If roster is None, then the notification goes to the site administrators.
* * 'where' -> contextBarry Warsaw2011-05-132-2/+5
| | | | * Improve documentation for Enum Storm type.
* Add bounce registration and bounce events.Barry Warsaw2011-05-131-0/+11
|
* newlineBarry Warsaw2011-04-221-1/+1
|
* Give IMembers a unique member id. We have to do this in order to give them aBarry Warsaw2011-04-221-4/+13
| | | | | | | | | | | | | | | | | | | | | | | path at the root of the resource tree (i.e. /members/X) and because when members can be subscribed by their IUser record (for preferred address), their canonical location cannot contain the address they are subscribed with. When their preferred address changes (without otherwise touching their membership), this address will change and that's not good for a canonical location. Other changes: * Added IMember.member_id attribute * Added ISubscriptionService.get_member() so member records can be retrieve by member id. * We can now get individual members by id via the REST API. * Extend the UniqueIDFactory so that it can take a 'context' (defaulting to None). The context is only used in the testing infrastructure so that separate files can be used for user ids and member ids. Otherwise, we'd have gaps in those sequences. * When *not* in testing mode, ensure that UIDs cannot be reused by keeping a table of all UIDs ever handed out. We *should* never get collisions, but this ensures it. * Clean up mailman.sql
* Users can now subscribe to a mailing list, and their preferred address willBarry Warsaw2011-04-171-205/+216
| | | | get delivery.
* Users now have a preferred address which can be set, changed, and deleted.Barry Warsaw2011-04-161-18/+23
| | | | The preferred address must be verified, and controllable by the user.
* add_member()Barry Warsaw2011-04-081-1/+1
| | | | | | | | | | | | - As the most common interface for adding new members (and users), adapt the password storing bit to storing only encrypted passwords in the database. schema.cfg: - Remove the creator_pw_file and site_pw_file as they are obsolete. - Add password_schema key for defining the default password encryption scheme. mailman.sql, user.py: - Store the password as a binary blob instead of as unicode text.
* * Re-organize the interface between buildout.cfg and the zope.testing layerBarry Warsaw2011-04-011-0/+1
| | | | | | | | | | | | | | | | | | | initialization. buildout.cfg is now really simple; it calls one method. That method does all the relevant layer initializations. This better localizes what has to be set up before testing can even begin. * IUsers now have a created_on property which contains the datetime at which the user record was created. * Rework the date and uid factories so that they consult the MockAndMonkeyLayer for the current testing flag. Also, those factories register themselves with the layer so that they'll get automatically reset between tests, without the layer actually having to know about them. * Move the User model object initialization into User.__init__() from the user manager. The User now also adds itself to the store. * Add a 'uid factory' for unique id creation, which is test suite aware.
* * Give users a unique, random, immutable user id.Barry Warsaw2011-03-181-1/+6
| | | | | * Find users by user_id via the user manager. * Extend the repr of users to include the user id.
* Eliminate Utils.get_pattern() and in the process, completely revampBarry Warsaw2011-02-251-2/+8
| | | | | | | | | subscription bans so as not to have to rely on BLOBS or pickles in the database. Also, be sure to include .rst files in both doctests and in the packaged tarballs. With the now awesome reST mode for Emacs, I plan to rename all .txt doctest files to .rst.
* Happy New Year.Barry Warsaw2011-01-014-4/+4
|
* Because it was just to damn confusing, rename IAddress.address toBarry Warsaw2011-01-011-1/+1
| | | | | | IAddress.email and IAddress.original_address to IAddress.original_email. From now on we'll use "address" to talk about the IAddress object and "email" to talk about the textual email address.
* Fairly significant change to the way member and nonmember moderation occurs.Barry Warsaw2010-12-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Now, nonmembers are represented by a separate roster of IMembers, the latter which has grown a `moderation_action` enum. When that action is `defer`, then the normal processing rules apply. Anything else and the `moderation` chain is jumped to for a shortcut to moderation (which may include immediate acceptance). TODO: handle unregistered nonmembers. Details: * The member-moderation rule is renamed to just moderation, and handles both members and nonmembers (though the latter must currently be registered). * The moderation rule is moved up in the builtin chain. It is now checked after `approved`, `emergency`, and `loop`, but before the normal moderation checks. This means that nonmember postings will be (by default) held much earlier. * IMember.is_moderated is removed. * IMember.moderation_action is added. * IMailingList.default_member_moderation is removed. * IMailingList.default_member_action and IMailingList.default_nonmember_action are added. * MemberRole.nonmember is added.
* This is part 1 of the merge of Jimmy Bergman's branchBarry Warsaw2010-12-281-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lp:~jimmy-sigint/mailman/restapi_additional_attributes Ostensibly, this adds support for a few additional attributes through the REST API: * default_member_moderation * generic_nonmember_action * member_moderation_action * reply_goes_to_list * send_welcome_msg * welcome_msg However, I had never previously fleshed out the conversion of default_member_moderation and member_moderation_action into the MM3 way of things. That is now done. Non-member moderation still needs to be done. Specific changes: * mailman.chains.base.Chain no longer self registers * The built-in chain gets a new link for checking 'member-moderation'. If this rule matches, it jumps to the 'member-moderation' chain, which checks member_moderation_action and returns a link that jumps to the appropriate terminal chain. * Chain initialization is done by the same auto-detection as rules, handlers, etc. The one tricky thing is that abstract base classes such as Chain and TerminalChainBase can't be instantiated. For now, there's an ugly special case to skip these. * default_member_moderation is now exposed in the IMailingList interface. * Member.is_moderated gets set in the constructor from the mailing list's default_member_moderation. * The 'moderation' rule is renamed 'member-moderation'. TODO: * Work out non-member moderation * Add member_moderation_action to IMailingList * Double check tests for reply_goes_to_list, send_welcome_msg, and welcome_msg
* | Upgrade from using the locknix package to using flufl.lock.Barry Warsaw2010-11-271-1/+1
|/
* Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-082-5/+0
| | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.
* Access mailing list configuration via RESTBarry Warsaw2010-08-101-1/+1
| | | | | | | | | | * last_post_time -> last_post_at * protocol -> scheme * creation_date _> created_at * last_post_time -> last_post_at * Add an extended JSON encoder for datetimes * Be sure to initialize convert_html_to_plaintext and filter_content in the default style.