summaryrefslogtreecommitdiff
path: root/src/mailman/model/pending.py
Commit message (Collapse)AuthorAgeFilesLines
* Delete subscription requests when a mailing list is deleted.Barry Warsaw2017-01-081-4/+3
| | | | Closes #214
* Delete all pendings when mailing list is deletedAbhilash Raj2017-01-081-2/+5
|
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Increase pendedkeyvalue table value column width.Mark Sapiro2016-12-151-2/+2
| | | | | Also require docutils==0.12 to work around https://github.com/sphinx-doc/sphinx/issues/3212
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Simplify the implementation.Barry Warsaw2016-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* MySQL is now an officially supported database.Barry Warsaw2016-07-291-5/+6
| | | | Given by Abhilash Raj.
* Clean up the model and languages directories.Barry Warsaw2016-03-251-13/+8
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Give the predictable ID factories similar APIs.Aurélien Bompard2015-12-261-1/+1
|
* Return predictable token IDs in testing mode.Aurélien Bompard2015-12-261-13/+5
| | | | | | This commits builds upon the mailman.utilities.uid.UniqueIDFactory to generate predictable tokens when the testing mode is activated. This will make VCR tapes more diffable between runs.
* A few minor cleanups.Barry Warsaw2015-12-161-3/+5
|
* Bring back the constructor for PendedKeyValueAurélien Bompard2015-12-161-0/+4
|
* Implement suggestions from the reviewAurélien Bompard2015-12-161-4/+7
|
* Add indexes on the Pendable fields that can be queried upon.Aurélien Bompard2015-12-161-13/+4
| | | | | | | - Pendable.token: queried in the add() and confirm() methods - Pendable.expiration_date: queried on evict() - PendableKeyValue.key and PendableKeyValue.value: queried in the find() method
* Make sure that Pendables always have a typeAurélien Bompard2015-12-161-3/+9
|
* Add a find method for pending requestsAurélien Bompard2015-12-161-2/+20
|
* Use the relationship instead of an explicit queryAurélien Bompard2015-12-161-4/+2
|
* Use the relationship cascade feature to delete key-valuesAurélien Bompard2015-12-161-9/+1
|
* Checkpointing.Barry Warsaw2015-04-161-0/+5
|
* * Mailing list subscription policy work flow has been completely rewritten.Barry Warsaw2015-04-151-1/+6
|\ | | | | | | | | | | It now properly supports email verification and subscription confirmation by the user, and approval by the moderator using unique tokens. ``IMailingList`` objects now have a ``subscription_policy`` attribute.
| * Checkpointing.Barry Warsaw2015-04-141-1/+5
|/
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-9/+4
|
* Fix pending.rst.Barry Warsaw2014-12-141-23/+11
| | | | | | NOTE NOTE NOTE: This is a potential upgrade issue. The values in the pending database used to be either custom pickle-like objects or actual pickles. Now all values are JSON representations.
* test_requests succeeds now, after changing some LargeBinary columns intoBarry Warsaw2014-12-011-4/+3
| | | | Unicode columns.
* * remove migrate commandAbhilash Raj2014-10-101-1/+1
| | | | | | | | * remove alembic.cfg, move contents to schema.cfg * fix import errors in src/mailman/model/language.py * add indexes * change the previously wrong written tablename autoresponserecord * change alembic_cfg to use schema.cfg instead of alembic.cfg
* Add support for postgresqlAbhilash Raj2014-09-251-1/+1
| | | | | | | | | * revert changes in message_id_has encoding by barry * Change message_id_hash column to LargeBinary (from previously mistaken one i.e.unicode) * add missing import in database/types.py * fix a bug in database/Model.py, transaction has no method abort(), instead it is rollback()
* Pass all tests with PYTHONWARNINGS=error.Barry Warsaw2014-09-221-13/+13
| | | | | | | | | | * 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-6/+9
|
* * remove some unused codeAbhilash Raj2014-09-191-1/+0
| | | | | | | * add left out documentation * remov super(<class>).__init__() calls in models as it was useless now. * remove schema_migrate func in mailman/database/base.py
* fix all tests in mailman.model.testsAbhilash Raj2014-09-131-12/+13
|
* * change declarative_base class to use ModelMeta classAbhilash Raj2014-09-061-3/+7
| | | | * update some queries to match SA style
* replace all storm types and relationships with sqlalchemyAbhilash Raj2014-09-051-10/+10
|
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* General code cleanup.Barry Warsaw2012-04-251-8/+7
| | | | | | | | - 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.
* - Module modernatizations (print function).Barry Warsaw2012-04-221-8/+10
| | | | - Convert direct use of config.db global to use the @dbconnection decorator.
* ArchitectureBarry Warsaw2012-03-261-6/+6
| | | | | | | | | | | | | | | | | | | ------------ * 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.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Happy New Year.Barry Warsaw2011-01-011-1/+1
|
* Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-081-2/+2
| | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.
* Happy New Year.Barry Warsaw2010-01-011-1/+1
|
* * Make IDomainManager a utility, since the config object is global.Barry Warsaw2009-12-081-1/+3
| | | | | | | | * Give IMailingList a .domain attribute which looks up the IDomain for its .host_name. This cleans up a lot of code. * Add a test for the 'confirm' email command. * Suppress blank lines in email command responses. * Make the IDomainCollection a utility.
* database/model reorganization. Model classes go in mailman.model. StockBarry Warsaw2009-10-101-0/+175
database support goes in mailman.database. Move stuff out of mailman/database/__init__.py.