| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |\ \
| | |/
| |/| |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
mlist-rosters.txt tests are removed.
Give MailingList entities a Preferences foreign key, so that they now have
preferences.
Member.preferences(): Watch out for unlinked addresses, i.e. which have no
user and thus no user preferences.
Address.controls() takes a text email address, not an IAddress.
UserManager: add create_address(), delete_address(), get_address(), and
'addresses' property.
Updated the address.txt and user.txt doctests as needed.
Added User.register() to register an email address and immediately link it to
a user.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
necessary to deal with the simplified user model. Eradicate more references
to rosters and roster sets.
Give Users a repr. Also give them a belongs_to() link to Preferences, but
change the user manager to not give a user preferences by default (the lookup
schema should properly handle users with no preferences now).
Also, when creating a user, set their real_name to the empty string if no
real_name argument was given to create_user(). Update the IUserManager
interface's create_user() method to match the implementation.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
they were previously known are now gone. Rosters, rather than being a
database entity that collects users, is now just a filter on the member
database. This way, we can use generic rosters to search for regular members,
digest members, owners, or moderators. More advanced rosters can do all kinds
of other membership queries. But rosters no longer need to be a database
entity.
Users have a name, password, optional preferences, and a set of addresses, but
users are not subscribed to mailing lists.
Addresses have the email address, some verification information, and optional
preferences.
Members tie an address to a mailing list, through a role, with optional
preferences.
Other changes here include:
MailList.fqdn_listname() moved to the MailingList model entity.
Added MemberRole enum and SystemDefaultPreferences to Mailman.constants.
Profiles are renamed to Preferences (same with the interface), but the files
are not yet moved. This happens later.
We mostly don't need has_*() relationships on the entity classes, because we
generally don't need the reverse relationship. Use belongs_to() because that
creates the foreign key, even though the wording seems counter intuitive.
IAddress.subscribe() added.
Tell Elixir to use shortnames for all tables.
Remove the OldStyleMembership fields from MailingList.
Remove all the interface elements and database fields that talk about rosters
and rostersets.
Convert Version entity to has_field().
|
| | | |
| | |
| | |
| | |
| | | |
mlist.send_digest_now() and
report them and continue processing the remaining lists.
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
checkbox
when there are only (un)subscribes and no held messages.
- Added a separator and heading for "Held Messages" like the ones for
"Subscribe Requests" and "Unsubscribe Requests".
- Added additional test to not display "Database Updated ..." when
coming from the login page.
|
| |/
|
| |
before looking for/deleting the Approve(d): line.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
do anything. The doctest needs to have some way of testing the grace period,
but it's still more tests of the module than there every was before.
Update the Replyboty handler to use $-strings internally. Eliminate the use
of %-strings in auto-response textsy. Only $-strings can be used, which
allows us to get rid of another use of SafeDict.
|
| |
|
|
|
|
|
|
|
| |
module. Add in a temporary reference (with XXX comment) to
Mailman.database.model.Language where necessary, although I will need to
remove this eventually.
Added clean up code to the mlist-rosters.txt doctest, otherwise it leaks the
test mailing list.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes live in Mailman/databae/model now.
Remove the TestDecorate test class from test_handlers.py and move them into a
doctest called decorate.txt (with harness in test_decorate.py).
Remove the dependence on SafeDict from the Decorate handler because I can now
use string.Template object to safely fill in header and footer templates.
Eventually I want to completely remove SafeDict from Mailman, but it's still
used in a few other places.
This also means that only $-strings will be supported in headers and footers,
and the import script will have to convert %-strings to $-strings. Also,
'_internal_name' is no longer a supported header/footer substitution
variable. Use $real_name or $list_name now. Added $fqdn_listname as a
substitution variable. Update the DEFAULT_MSG_FOOTER accordingly.
|
| |
|
|
| |
password for the user, or if it's "{NONE}".
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
confident the Elixir branch is ready to become mainline. Also, fewer branches
makes for an easier migration to a dvcs.
Don't expect much of the old test suite to work, or even for much of the old
functionality to work. The changes here are disruptive enough to break higher
level parts of Mailman. But that's okay because I am slowly building up a new
and improved test suite, which will lead to a functional system again.
For now, only the doctests in Mailman/docs (and their related test harnesses)
will pass, but they all do pass. Note that Mailman/docs serve as system
documentation first and unit tests second. You should be able to read the
doctest files to understand the underlying data model.
Other changes included in this merge:
- Added the Mailman.ext extension package.
- zope.interfaces uses to describe major components
- SQLAlchemy/Elixir used as the database model
- Top level doinstall target renamed to justinstall
- 3rd-party packages are now installed in pythonlib/lib/python to be more
compliant with distutils standards. This allows us to use just --home
instead of all the --install-* options.
- No longer need to include the email package or pysqlite, as Python 2.5 is
required (and comes with both packages).
- munepy package is included, for Python enums
- IRosterSets are added as a way to manage a collection of IRosters. Roster
sets are named so that we can maintain the indirection between mailing lists
and rosters, where the two are maintained in different storages.
- IMailingListRosters: remove_*_roster() -> delete_*_roster()
- Remove IMember interface.
- Utils.list_names() -> config.list_manager.names
- fqdn_listname() takes an optional hostname argument.
- Added a bunch of new exceptions used throughout the new interfaces.
- Make LockFile a context manager for use with the 'with' statement.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bin/testall.py
- Improvements to setting up the tests with temporary files for the db and
configuration. Don't accept -C/--config because that will just confuse
things.
- Copy our new testing.cfg.in template file to a temp file, populate it
with a few additional run-time calculate values, and use that in both
the parent (bin/testall script) and children (bin/mailmanctl and
friends).
Mailman/initialize.py
- Split up initialize() into two functions as required by the test suite
reorg above. Almost everything else in Mailman will continue to use the
initialize() function though.
Mailman/configuration.py
- Store the filename that was used to load the .cfg file from on the
configuration object.
|
| |
|
|
| |
version of the email package. So, finally! we can get rid of our copy.
|
| |
|
|
| |
Python 2.5 is required.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiated MailList object via the mapper extension's populate_instance()
method. This based on information from the SQLAlchemy folks.
Add more useful output for LockFile debugging.
Add checks in loginit.py's emit() method (and .flush()) so that if the stream
has been closed, log messages will go to stderr. This happens under the test
suite with SQLAlchemy, because SA keeps references to the MailList objects
which it doesn't seem like we can clear before Python exits. So if say the
lock logger is at debug level, when the lock object gets cleared at Python
shutdown, the stream will have been closed by the time LockFile.__del__() gets
called. This change avoids the traceback at the expense of a little extra
stderr output.
MailList.__lock -> MailList._lock
MailList.__timestamp -> MailList._timestamp
|
| |
|
|
| |
more deeply nested than 1 level.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DBContext.api_load(). This is where it really ought to be based on the
internal semantics of .Load()/.Lock().
MailListMapperExtension.populate_instance(): Checking the state of the isnew
flag is not sufficient to know whether the MailList object we're getting is
brand spankin' new or not. It turns out that when we session.expire() the
MailList object, the next time SA loads this from the db, the
populate_instance() will get called with isnew=True, even though the object
really isn't new. Instead, check to make sure InitTempVars() isn't
incorrectly called twice. Note that I might move this test, but I wanted to
check in something that works, and then see if this is what we expect from the
SA guys (this flag appears underdocumented).
LockFile.py: Add some additional debugging.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ConfigParser style ini file which can be used to override various default
settings for just the named loggers.
For example, if you want just the locks logger to print at DEBUG level, add
this:
etc/mailman.cfg:
LOG_CONFIG_FILE = 'etc/mailman.log'
etc/mailman.log:
[locks]
level = DEBUG
|
| |
|
|
|
|
|
|
|
|
|
| |
expire the object. This way, when the MailList attributes are next accessed,
the ORM will reload them from the database, getting any new values possibly
set in other processes.
This works better than trying to use always_refresh=True on the mapper, or
trying to do a reload() because both of those approaches blow away locks. I'm
not sure why this, but I suspect that it's because the identity map is handing
us back a different object, rather than invalidating the object's attributes.
|
| |
|
|
|
| |
Cgi/create.py: password scheme lookup.
|
| | |
|
| |
|
|
|
|
|
| |
Mark Sapiro's patch for 'format' parameter. (Decorate.py, Scrubber.py)
Scrubber.py: More brush up of code ... 'Content-Transfer-Encoding' is not
updated by msg.set_payload(). 'Url:' to 'URL:' normalization.
test_handlers.py: Test codes for Decorate.py and Scrubber.py.
|
| |
|
|
|
|
|
|
|
| |
Subject munging code made unified for both i18n and ascii encodings.
test_handlers.py
Adding test code for i18n and numbering subject munging.
(also tab normalization for the last commit)
|
| |
|
|
|
|
|
|
| |
nor StringIO have 'encoding'. What we need was unicode string StringIO and
python StringIO has it already. Also, use utf-8 for the table of contents
in MIME digest if the subject has a different charset.
Adding a test code for the multi-language digest.
|
| |
|
|
|
|
| |
to encode by output_charset (language == 'ja' and cset == 'euc-jp').
Add a test code for list language is 'ja' and message is 'iso-2022-jp';
('Japanese' in header/footer, 'French' in message).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
scheme. Fix mmsitepass and test cases accordingly. Details:
- set_global_password(): Instead of taking a string for 'scheme' argument,
take None and then coerce that into passwords.Schemes.ssha
- Add a base PasswordError and a BadPasswordSchemeError error that derives
from that. For consistency, multiply inherit MMBadPasswordError and
MMPasswordsMustMatch from PasswordError.
- Add a passwords.lookup_scheme() method which turns scheme_names into scheme
enum constants. It returns None if the lookup fails.
- passwords.py: change the internal representation of _SCHEMES_BY_TAG
dictionary to map scheme names to scheme enum values. Change internal uses
of this dictionary to then turn those enum values into hash classes, or
whatever else we need.
- make_secret(): Raise BadPasswordSchemeErrorif the given schema (which should
be an enum value) is invalid.
- TestBase.tearDown(): Clear out any <site> locks that might hang around after
a test case runs.
|
| |
|
|
|
|
| |
However, I also changed the semantics a bit to be closer to what I
wanted, namely that iteration returns the EnumValue objects, not the
string names of the attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switchboard.py
- Use listname.encode('utf-8') to produce the necessary 8-bit string,
instead of str(listname). Also update the preceding comment.
senddigests.py
- Remove an unnecessary import.
Decorate.py
- Remove a commented out section of code.
- Remove some redundant local variables
- Reorganize the section that's trying to find a usable encoding for the
payload of the modified message. I don't think it really hurts much to
try duplicate charsets when lcset == mcset, or when either == utf-8.
Just go ahead and try them and let them fail. This simplifies the code.
Also, try to get just the minimum necessary code under the
UnicodeError. I think it's enough to catch the payload.encode() call.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- In i18n.py, change this method so that everything it returns will be
guaranteed to be a unicode. Mailman 2.2 will be unicode-safe, meaning all
strings internally will be unicodes. The translation service is one
boundary point were strings come from the outside, so ensure that they are
unicodes and convert if necessary. This may break some things, but it's
better to fix those situations than to continue to return 8-bit strings from
_().
- In Mailman/testing/base.py, craft a fake module called Mailman.MTA.stub and
stick no-op functions on stub.create() and stub.remove(). We really don't
need the MTA modules for testing purposes (yet at least), and if you're
using the default configuration, you'll get tons of cruft on stdout when the
Manual MTA tries to add and remove mailing lists.
Set up the test configuration environment to use this stub MTA module.
- In test_handlers.py, remove an extraneous str().
- Convert ToDigest.py, Hold.py and Acknowledge.py to __i18n_templates__. (I'm
pretty darn close to just making everything use $-strings by default.)
- In CookHeaders.py, there's no need to unicode()-ify the subject since that
should already be a unicode when passed from _().
- In MailList.py, we can use the str.capitalize() method.
|
| |
|
|
|
|
|
| |
with upper case in the domain if the local part was all lower case.
- Changed the semantics of OldStyleMemberships.changeMemberAddress os that
in the case of a straightforward address change, i.e. nodelete = 0,
delivery status and time are preserved if BYUSER or BYADMIN.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
emum.py:
'cls' is used instead of 'self'
mmsitepass.py:
SCHEMES -> Schemes
passwords.py:
make_secret is called with 'scheme' in string.
decode() of challenge string fails if it is unicode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mailman/Queue/Switchboard.py:
listname is returned in unicode.
( '\x80' + 'a' is OK, '\x80' + u'a' is NG)
Mailman/Utils.py:
Utils.oneline() is extended for returning unicode string.
Mailman/Digester.py:
next_post_number is not used anywhere.
Mailman/database/listdata.py:
Attributes added (esp. for non web u/i)
Mailman/bin/senddigests.py:
Initialization
Mailman/Handlers/ToDigest.py:
Internal string calculation is done in unicode. So, several fixes.
StringIO is used because cStringIO doesn't have encoding attribute.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use much nicer identifiers for constants than plain ints or strings. New code
using enumerating constants should use subclasses of enum.Enum.
Along those lines, the passwords.py module has been rewritten to use enum
constants instead of strings. So now e.g. the default password scheme is
Mailman.passwords.Schemes.ssha and there are Scheme.pbkdf2 and Scheme.sha
(etc) schemes as well.
Also, rework the passwords.py implementation to better support unicode
passwords. This elaborates on Tokio's r8160 by recognizing that the hash
algorithms always operate on byte-strings not on unicodes. Thus if the secret
or response are unicodes, encode them to byte-strings via utf-8 before hashing
and comparing.
Unit tests added for both enums and passwords.
|
| |
|
|
|
|
|
|
| |
- As the default type of string in mailman-2.2 was set to 'unicode',
i18n codes became need to be fixed.
- Fixed: admin web interface. Other web interfaces needs more verification.
- Fixed: non-digest delivery. Stil to go: digest and archive.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
I put it in $var-prefix.
mmsitepass.py ... parseargs() fails because config is not
loaded before initialize(config).
passwords.make_secret() should be called.
|
| |
|
|
|
| |
moderator password.
- Changed public roster syntax to accept optional password.
|
| | |
|
| | |
|