summaryrefslogtreecommitdiff
path: root/Mailman/enum.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge exp-elixir-branch to trunk. There is enough working to make me feelbwarsaw2007-05-281-132/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added a test case for the code that Tokio fixed for enums in r8164.bwarsaw2007-03-211-1/+1
| | | | | | 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.
* Some fixes for rev 8162 for mmsitepass to work.tkikuchi2007-03-031-2/+2
| | | | | | | | | | 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.
* Backport the enum package from the abortive Mailman 3 branch. This lets usbwarsaw2007-03-021-0/+132
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.