summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | merge upstream trunkBarry Warsaw2007-06-111-5/+21
| |\ \ | | |/ | |/|
| * | add the ignore fileBarry Warsaw2007-06-101-0/+27
| | |
| * | More test updates based on simplified data model. Rosters are gone so theBarry Warsaw2007-06-1010-301/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Repair the usermanager.txt and listmanager.txt doc tests. These repairs wereBarry Warsaw2007-06-096-80/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Implement the new, simplified membership model. Rosters and RosterSets asBarry Warsaw2007-06-0921-293/+569
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* | | senddigests.py - Changed to catch exceptions thrown by ↵msapiro2007-06-151-2/+13
| | | | | | | | | | | | | | | mlist.send_digest_now() and report them and continue processing the remaining lists.
* | | admindb.py - Changed to not show the "Discard all messages marked Defer" ↵msapiro2007-06-121-4/+7
| |/ |/| | | | | | | | | | | | | | | | | 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.
* | Improved processing of an Approve(d): body line by decoding the body payloadmsapiro2007-06-091-5/+21
|/ | | before looking for/deleting the Approve(d): line.
* rename a few testsbwarsaw2007-06-024-2/+2
|
* Add doctest for Replybot handler. The test in test_handlers.py didn't reallybwarsaw2007-05-315-37/+277
| | | | | | | | | 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.
* Remove leftover reference to removed Mailman.database.tables.languagesbwarsaw2007-05-303-2/+11
| | | | | | | | | 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.
* Go ahead and remove the Mailman/database/tables directory since all the Elixirbwarsaw2007-05-3017-789/+385
| | | | | | | | | | | | | | | | | | 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.
* Support resetting a user's password if the imported file does not have abwarsaw2007-05-291-6/+13
| | | | password for the user, or if it's "{NONE}".
* Minor style issue.bwarsaw2007-05-291-1/+1
|
* Merge exp-elixir-branch to trunk. There is enough working to make me feelbwarsaw2007-05-28111-2958/+6396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Minor update to test bzr sync'ingbwarsaw2007-05-081-3/+3
|
* update the wiki urlbwarsaw2007-04-301-4/+2
|
* Another round of merges of my Pycon branch...bwarsaw2007-04-179-67/+575
| | | | | | | | | | | | | | | | | | | | 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.
* Python 2.5 is the required minimum now and that comes with the required ↵bwarsaw2007-04-122-1/+1
| | | | version of the email package. So, finally! we can get rid of our copy.
* Add a missing import.bwarsaw2007-04-103-246/+499
| | | | Python 2.5 is required.
* Improve the way we handle avoiding InitTempVars() multiple times on anbwarsaw2007-04-095-31/+55
| | | | | | | | | | | | | | | | | | | 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
* r8187 from 2.1-maint branch; fix bin/withlist -r to work with package pathsbwarsaw2007-04-051-2/+3
| | | | more deeply nested than 1 level.
* Moved the session.expire() to the MailList.Load() method, viabwarsaw2007-04-034-2/+15
| | | | | | | | | | | | | | | | | 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.
* Add a configuration variable called LOG_CONFIG_FILE. If set, this names abwarsaw2007-03-312-47/+79
| | | | | | | | | | | | | | | 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
* api_lock(): When locking the MailList object, tell the SQLAlchemy session tobwarsaw2007-03-302-1/+1
| | | | | | | | | | | 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.
* passwords.py: 'utf-8' normalization.tkikuchi2007-03-272-3/+3
| | | | | Cgi/create.py: password scheme lookup.
* Fix passwords in bin/newlist. Yes, this needs unit tests!bwarsaw2007-03-271-6/+6
|
* passwords.py: Looks like we still need unicode checking.tkikuchi2007-03-254-44/+199
| | | | | | | 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.
* CookHeaders.py:tkikuchi2007-03-242-30/+77
| | | | | | | | | 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)
* Brush up the fall-back-to-utf8 mechanizm in ToDigest.py. Neither cStringIOtkikuchi2007-03-242-16/+52
| | | | | | | | 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.
* Fix of Decorate.py for the case (input_charset != output_charset) and failtkikuchi2007-03-232-5/+23
| | | | | | 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).
* Restore the use of passwords.Schemes enum for selection of password hashingbwarsaw2007-03-229-24/+91
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added a test case for the code that Tokio fixed for enums in r8164.bwarsaw2007-03-212-2/+9
| | | | | | 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.
* A few style fixes based on commit reviews.bwarsaw2007-03-213-19/+12
| | | | | | | | | | | | | | | | | | | | 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.
* Test suite repair. All tests are now passing again.bwarsaw2007-03-218-30/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* - Fixed a bug in OldStyleMemberships.addNewMember that allowed adding an addressmsapiro2007-03-201-1/+8
| | | | | | | 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.
* Scheme is selected by TAG. Use string not object reference.tkikuchi2007-03-201-5/+5
|
* csetstr is not set if lang==None. Use charset as string.tkikuchi2007-03-101-5/+4
|
* Big update of Czech translationsdanohnesorg2007-03-091-904/+418
|
* Some fixes for rev 8162 for mmsitepass to work.tkikuchi2007-03-033-5/+8
| | | | | | | | | | 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.
* Fixes for i18n digest to work.tkikuchi2007-03-026-14/+32
| | | | | | | | | | | | | | | | | | 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.
* Backport the enum package from the abortive Mailman 3 branch. This lets usbwarsaw2007-03-024-22/+457
| | | | | | | | | | | | | | | | | | 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.
* Restoreing i18n in 2.2tkikuchi2007-03-0110-50/+64
| | | | | | | | - 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.
* Hashed password should be ascii string not unicode.tkikuchi2007-02-221-1/+1
|
* Fixed bug # 1660666.msapiro2007-02-151-3/+4
|
* Move FAQbwarsaw2007-02-071-0/+0
|
* Where should etc directory belong, $prefix or $var-prefix?tkikuchi2007-02-033-6/+14
| | | | | | | | | | I put it in $var-prefix. mmsitepass.py ... parseargs() fails because config is not loaded before initialize(config). passwords.make_secret() should be called.
* - Changed to show hidden members when authorization is by list admin or ↵msapiro2007-01-211-14/+36
| | | | | moderator password. - Changed public roster syntax to accept optional password.
* Changed header_filter_rules processing to ignore blank patterns.msapiro2007-01-201-0/+3
|
* Update copyright years.bwarsaw2007-01-19198-841/+549
|