| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
| |
easier to test, and to use in other tests. Do this by moving most of the guts
of master.py into a class that can be subclassed, and thus run in a subthread
to avoid blocking the test. We don't need to sleep anymore.
|
| | |
|
| |
|
|
| |
wasn't waiting on all the children before it exited itself.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
the built-in pipeline.
Fixed DEFAULT_SUBJECT_PREFIX to take $-names instead of %-names, although I'm
not entirely sure the %%d stuff still works (we need a test for this).
Added IMailingList.real_name attribute and added this to the default style. A
column for this was in the database but not in the storm object. Also
re-enabled the style's subject_prefix attribute.
Moved some of the digest test functions into Mailman.tests.helpers.
|
| | |
|
| |
|
|
|
|
|
| |
Added a Mailman.tests.helpers module for some commonly used stuff (although
test refactoring hasn't yet happened).
Give Mailman 3.0a1 a code name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the big explanatory text at the beginning of incoming.py to a doctest called
OVERVIEW.tt (which doesn't actually contain any tests yet -- it's
documentation though).
Added a doctest for the incoming runner, though this will be fleshed out in
more detail next.
Mailman.Post renamed to Mailman.inject, and simplified. We don't need its
command line script behavior because that is now handled by bin/inject.
Add a 'start_chain' attribute to mailing lists. This names the chain that
processing of messages for that list begins with.
We were inconsistent in the use of the 'no reply' address attribute. It's now
always 'no_reply_address'.
Update the smtplistener helper with lessons learned about how to suppress
bogus asyncore error messages. Also, switch to using a maildir mailbox
instead of an mbox mailbox.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable to the new chain processing system. Create a header-matching chain
which handles global site header matching rules defined by HEADER_MATCHES.
Rip this logic out of the SpamDetect handler; really this entire handler needs
to go away but the rest of it isn't ported yet.
IChains now have a get_rule() method which allows them to return private
(i.e. not globally registered) rules. This is used by the header matching
chain.
Mailman.app.chains.process() has had its parameter list reordered to be more
like all other function signatures that take a mailing list, message, and
message metadata.
|
| |
|
|
|
|
| |
called 'docs' anywhere under the Mailman package. Change the rule API to
return rule classes not instances. Added the ChainJump enum, though this will
likely change soon.
|
| |
|
|
|
|
|
|
| |
Rename the implicit.txt doctest.
specialized_message_from_string(): Mimic the way the text->message parser will
include the size of the original text as an attribute on the message object.
The maximum message size rule will use this information.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
values are unicodes if they come from the base class as a string.
Get rid of the 'global id'. Now use just Message-ID. Rename
X-List-ID-Hash to X-Message-ID-Hash. Do not take Date header into
account when calculating this hash.
Because of the above change, the assumption is that there will be no
Message-ID collisions. Therefore, get rid of IMessageStore
.get_message(), .get_messages_by_message_id() and
.get_messages_by_hash(). Instead, it's now .get_message_by_id() and
.get_message_by_hash() both of which return the message object or
None.
Message.hash -> Message.message_id_hash
When storing a message in the message store, the final path component
has the entire hash, not just the leftover parts after directory
prefix splitting.
MessageStore.delete_message() deletes the file too.
Doctests clean up message store messages though the message store
instead of directly off the filesystem.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
reasons for this, but most importantly, the changes from SQLAlchemy/Elixir 0.3
to 0.4 were substantial and caused a lot of work. This work unfortunately did
not result in a working branch due to very strange and inconsistent behavior
with Unicode columns. Sometimes such columns would return Unicode, sometimes
8-bit strings, with no rhyme or reason. I gave up debugging this after many
hours of head scratching.
Oh yeah, no more flush!
Storm enforces Unicode columns, which is very nice, though requires us to add
lots of 'u's in places we didn't have them before. Ultimately, this is a good
thing so that the core of Mailman will be Unicode consistent.
One thing I still want to clean up after this, is the function-scoped imports
in the model code. Part of the reason for the separate model classes was to
avoid this, but for now, we'll live with it. Storm's architecture requires us
to maintain a database-table-class registry for simple clearing after tests
in Database._reset(). This is made fairly simple by Storm allowing us to use
our own metaclass for model classes.
Storm does require that we write our own SQL files, which is a downside, but I
think our schema will be easy enough that this won't be a huge burden. Plus
we have a head-start <wink>.
Another cool thing about Storm is the explicit use of stores for objects.
This should eventually allow me to flesh out my idea of storage pillars for 1)
lists, 2) users, 3) messages.
Some other changes:
- pylint and pyflakes cleanups
- SQLALCHEMY_ENGINE_URL -> DEFAULT_DATABASE_URL
- Don't import-* from Version in Defaults.py
- Add interface method to Mailman.Message.Message so that __getitem__() and
get_all() always return Unicode headers, even when the underlying objects
are strings. This should generally be safe as headers are required by RFC
to be within the ASCII range.
- Fix bin/arch.py to use proper initialization.
|
| | |
| |
| |
| |
| | |
Remove flush() altogether. Yee-haw! Rework queries to be Stormy. Fix
doctests to be Unicode-ish.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This hacks around an apparent bug in the email package where if you parse a
unicode message string, you still end up getting 8-bit strings out of the
headers, and probably payloads.
The hack is to override Mailman.Message.Message.__getitem__() to force the
header value returned to a Unicode. It must be ASCII but this is required
anyway by RFC 2822. It's not perfect, but it lets us get farther without
forcing a detour into fixing the email package.
Other changes:
- Fix the Address table's references, and also update the subscribe() query.
- Fix the Member table's references and add a __init__().
- Fix Roster's get_member() query.
- Fix the Enum class's variable_class attribute.
- UserManager.create_user() has to use Unicodes for real_name.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
Mailman/Bouncers/SimpleMatch.py - Improved two regexps.
Mailman/tests/test_bounces.py - Added a test.
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
is moved to Mailman.lockfile.
Remove a few more MailList methods that aren't used any more, e.g. the lock
related stuff, the Save() and CheckValues() methods, as well as
ChangeMemberName().
Add a missing import to lifecycle.py.
We no longer need withlist to unlock the mailing list. Also, expose
config.db.flush() in the namespace of withlist directly, under 'flush'.
|
| |
|
|
|
|
|
|
|
|
| |
model. Specifically, where a mailing list used to have both a
password and a moderator password, both of which could be used in the
Approved header, now a mailing list has only a shared moderator
password. This moderator password's only purpose in life is to allow
for Approved header posting.
test_handlers.py is now completely ported to doctests, so it's removed.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
removing the module. Then, fix a few tests that failed as a result of
this work.
Mailman/Handlers/Hold.py: Call hold_message() instead of
mlist.HoldMessage().
The message store also no longer requires a Date: header, so clean up
a few tests that were still expecting that.
Extend cleaning_teardown() in test_documentation.py so that both the
message store and any list-centric requests are cleaned up after each
test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BadListNameError is gone. Use InvalidEmailAddress instead.
Move owner registration from bin/newlist to Mailman/app/create.py, but do not
verified owner email addresses here. Eventually we'll hook in the IRegistrar
stuff for unverified owner addresses.
IStyleManager.register() verifies that its registering an IStyle.
Added IStyleManager.unregister(), along with updated interfaces and doctests.
Clean up all styles except the default one in the system documentation test
harness.
|
| |
|
|
|
| |
message_store, and pendings 'databases' hang off the IDatabase object attached
to the config object. For IPending, no adaptation is necessary.
|
| |
|
|
| |
disabled anyway.
|
|
|
* Mailman/testing -> Mailman/test
* Removed Mailman/testing/base.py
* Fix mailmanctl by using a different way of calculating where the qrunner
script is. The configuration file no longer knows what BIN_DIR is, but the
mailmanctl script knows where it lives via sys.argv[0]. Also, PREFIX_DIR ->
VAR_DIR.
Also,
* Since the overwhelmingly predominant use of ILanguageManager is to get the
description, and since .get_language_data(code)[0] is not very readable,
split the interface into .get_description() and .get_charset().
* In the setup, automatically add all Mailman.bin modules as command line
scripts.
|