summaryrefslogtreecommitdiff
path: root/Mailman/database/model/message.py
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize the database subpackage, primarily by removing the 'model'Barry Warsaw2007-12-081-42/+0
| | | | | subdirectory and updating all relevant imports. Move of the circular import problems have been eliminated in the process.
* All the simple test fixes are now in, and while there are still some failingBarry Warsaw2007-11-101-4/+11
| | | | | | tests, we're making very good progress. Just the tough ones are left. This change did modify the the schema a bit, for better naming and typing. E.g. 'type' -> 'request_type' and using a RawStr for a hash type.
* Target Mailman onto the Storm <http://storm.canonical.com> Python ORM. ThisBarry Warsaw2007-11-041-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enables a few interesting things: 1. It makes it easier to do our "pillars of storage" idea, where list data and messages could live in one database, but user information live in a separate database. 2. It reduces the number of moving parts. SQLAlchemy and Elixir can both go away in favor of just one database layer. 3. No more Unicode/string mush hell. Somewhere along the way the upgrade to SQLAlchemy 0.4 and Elixir 0.4 made the strings coming out the database sometimes Unicode and sometimes 8-bit. This was totally unpredictable. Storm asserts that if a property is declared Unicode, it comes in and goes out as Unicode. 4. 'flush' is gone. One cost of this is that Storm does not yet currently support schema generation. So I cheat by dumping the trunk's SQLite schema and using that as a starting place for the Storm-based schema. I hope that Storm will eventually address this. Other related changes include: - SQLALCHEMY_ENGINE_URL is renamed to DEFAULT_DATABASE_URL. This may still get changed. Things I still want to fix: - Ickyness with clearing the databases. - Really implement multiple stores with better management of the Store instances. - Fix all the circular import nasties.
* Much progress, though not perfect, on migrating to SQLAlchemy 0.4 and ElixirBarry Warsaw2007-10-311-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0.4. Lots of things changes, which broke lots of our code. There are still a couple of failures in the test suite that I don't understand. It seems that for pending.txt and requests.txt, sometimes strings come back from the database as 8-bit strings and other times as unicodes. It's impossible to make these tests work both separately and together. users.txt is also failing intermittently. Lots of different behavior between running the full test suite all together and running individual tests. Sigh. Note also that actually, Elixir 0.4.0 doesn't work for us. There's a bug in that version that prevented zope.interfaces and Elixir working together. Get the latest 0.4.0 from source to fix this. Other changes include: - Remove Mailman/lockfile.py. While I haven't totally eliminated locking, I have released the lockfile as a separate Python package called locknix, which Mailman 3.0 now depends on. - Renamed Mailman/interfaces/messagestore.py and added an IMessage interface. - bin/testall raises turns on SQLALCHEMY_ECHO when the verbosity is above 3 (that's three -v's because the default verbosity is 1). - add_domain() in config files now allows url_host to be optional. If not given, it defaults to email_host. - Added a non-public interface IDatabase._reset() used by the test suite to zap the database between doctests. Added an implementation in the model which just runs through all rows in all entities, deleting them. - [I]Pending renamed to [I]Pended - Don't allow Pendings.add() to infloop. - In the model's User impelementations, we don't need to append or remove the address when linking and unlinking. By setting the address.user attribute, SQLAlchemy appears to do the right thing, though I'm not 100% sure of that (see the above mentioned failures).
* The start of a message store definition. Whether this will end up being usedBarry Warsaw2007-07-221-0/+30
for the archive or not is left to be seen. Define an interface, test, and implementation of a basic message store using globally unique identifiers of the form: archive/hash/seqno - archive is the base url of the archive, e.g. http://archives.example.com. This is available in the List-Archive header. - hash is the base32 encoded sha1 hash of the message's Message-ID and Date headers, which it must have. This is available in the X-List-ID-Hash header. - seqno is a sequence number specific to the archive which will uniquely identify the message should there be a Message-ID/Date collision. this is available in the X-List-Sequence-Number header. Added a MESSAGES_DIR variable to the config. Added a .message_store attribute to the config.