| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.
|
| |
|
|
|
|
|
|
| |
used where we used to do a try/except to temporarily change the global
translation language. This makes the code shorter and cleaner. E.g.
with i18n.using_language(another_language):
# do something
|
| |
|
|
|
|
|
|
|
|
|
| |
Ignore mailman.egg-info
In bin/make_instance.py: Catch and ignore import errors when importing
Mailman.i18n. Before this script has actually been run, there won't be enough
infrastructure in place of the import to succeed. Include several other fixes
in this file.
Add install_requires to the setup script.
|
| | |
|
| | |
|
| |
|
|
| |
even if you got to the message from a subject, date or author index, previous
and next are still by thread.
|
| |
|
|
|
|
| |
the builtin types. Two still remain: a check against ClassType and a check
against MethodType. Also, fix some hinky type comparisons to use isinstance()
consistently.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
traces of our crufty old Syslog. Most of this work was purely mechanical,
except for:
1) Initializing the loggers. For this, there's a new module
Mailman/loginit.py (yes all modules from now on will use PEP 8
names). We can't call this 'logging.py' because that will
interfere with importing the stdlib module of the same name (can
you say Python 2.5 and absolute imports?).
If you want to write log messages both to the log file and to
stderr, pass True to loginit.initialize(). This will turn on
propagation of log messages to the parent 'mailman' logger, which
is set up to print to stderr. This is how bin/qrunner works when
not running as a subprocess of mailmanctl.
2) The driver script. I had to untwist the StampedLogger stuff and
implement differently printing exceptions and such to log/error
because standard logging objects don't have a write() method. So
we write to a cStringIO and then pass that to the logger.
3) SMTPDirect.py because of the configurability of the log messages.
This required changing SafeDict into a dict subclass (which is
better than using UserDicts anyway -- yay Python 2.3!). It's
probably still possible to flummox things up if you change the
name of the loggers in the SMTP_LOG_* variables in mm_cfg.py.
However, the worst you can do is cause output to go to stderr and
not go to a log file.
Note too that all entry points into the Mailman system must call
Mailman.loginit.initialize() or the log output will go to stderr
(which may occasionally be what you want). Currently all CGIs and
qrunners should be working properly.
I wish I could have tested all code paths that touch the logger, but
that's infeasible. I have tested this, but it's possible that there
were some mistakes in the translation.
- Mailman.Bouncers.BounceAPI.Stop is a singleton, but not a class
instance any more.
- True/False code cleanup, PEP 8 import restructuring, whitespace
normalization, and copyright year updates, as appropriate.
|
| |
|
|
|
|
|
|
|
|
|
| |
- Remove True/False binding cruft
- Remove __future__ statements for nested scopes
- Remove ascii_letters import hack from Utils.py
- Remove mimetypes.guess_all_extensions import hack from Scrubber.py
- In Pending.py, set _missing to object() (better than using [])
Also, update copyright years where appropriate, and re-order imports more to
my PEP 8 tastes. Whitespace normalize.
|
| | |
|
| |
|
|
| |
because it is overwrapped in Mailman.Message.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
stylistic modifications. This fixes caching by adding the listname to
the cache key. Otherwise, lists with local overriding templates would
find the wrong template. Uses the new Utils.findtext() interface.
|
| |
|
|
| |
the year is weird (e.g. 1969). Also, code cleanup.
|
| | |
|
| |
|
|
|
| |
message.get_param(). Such beasts are RFC 2231 charsets which need to
be converted to unicode.
|
| |
|
|
| |
in email obscuring in the body of the message.
|
| |
|
|
| |
messages when ARCHIVER_OBSCURES_EMAILADDRS is true.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch restores MIME charset capabilities for article archiving in
CVS Mailman. It:
- removes the .charset attribute from articles; all yarticles are
encoded in the list's charset,
- decodes subject and author to Unicode; if this fails, no decoding
(not even MIME) is done to subject and author,
- MIME-decodes the body in the constructor using get_payload, removes
the hand-crafted qp decoding from _get_body,
- Unicode-decodes the body in the constructor if the body's charset
differs from the list's charset,
- fixes processbody_URLquote to always return byte strings (by
escaping the URL also); comparing the old and the new string is no
longer possible since the old string is Unicode and the new string
is a list-encoded byte string.
- changes text archiving to have the archives in the list's encoding,
with unsupported characters 'replace'd
With these changes, I can process the playground archives correctly,
to get mojibake-free pages.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
explanations:
HyperArch.py in 2.1b5 use Utils.uquote() for CGIescape() and
html_quote() but it does not take language argument. This is no
good for multilbyte charset because characters are escaped in
separate 8bit bytes which results in mojibake. We should rather
use Utils.uncanonstr() to honor the legal characters within the
multibyte charset. This patch fixes other minor bugs in the
current code.
and...
Utils.uquote() makes a multibyte character into two or more
fragmants of Latin-1 characters.
Utils.uquote() makes all the 8bit-set character escaped while
Utils.uncanonstr() checks if the character is within the charset
and escapes only if the chatacter is not legal.
Some additional minor code cleanup by Barry.
|
| |
|
|
|
|
| |
unknown character set specified in an RFC 2047 encoded header, or in
the Content-Type of one of the parts, we'd get a LookupError. This
simply moves the make_header() call to inside the try/except.
|
| |
|
|
|
|
|
| |
file was moved or deleted, and an explicit mbox file name was given to
bin/arch.
Closes SF # 649011
|
| |
|
|
| |
SF bug #648604.
|
| |
|
|
| |
Closes SF bug #648607
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed to fully fix SF bug #644294. Old archived Articles
won't have the _mlist attribute but we really want that for better
handling of page creation. Unfortunately, only the HyperDatabase
knows this value so this is a public method it can call after the
fact.
as_html(): Fix address obscuring in the article pages. If
ARCHIVER_OBSCURES_EMAILADDRS is true, then we'll `at-ify' the visible
author text and point the mailto: to the list's posting address.
HyperArchive.__init__(): Pass the maillist to the HyperDatabase
constructor.
write_index_entry(): If ARCHIVER_OBSCURES_EMAILADDRS, `at-ify' the
author field in the index. This might catch non-addresses with @'s in
them, but so what? For the most part, it'll moderately obscure email
addresses.
__processbody_URLquote(): Futile attempt at code cleaning for a method
that I don't think ever gets called. :/
|
| |
|
|
|
|
|
|
|
|
|
|
| |
completeness (this really needs to be refactored).
Article.as_html(): Set the encoding of the page to the list's
preferred encoding, which seems to make the headers and bodies come
out okay when mixing languages -- at least as in the minimal testing
I've been able to do.
Woo boy, I'm really not positive about this change and would love a
second opinion. Martin?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SF patch #634303, but I think it's better because it actually removes
code instead of adding it. We'll see what kind of holes Martin shoots
through my optimism. ;)
Specifically,
unicode_quote() -> Utils.uquote() everywhere
quick_maketext(): We can get rid of the `raw' argument since we're
never going to wrap html text here. Also, put in a defense for
lang=None and mlist=None (although in practice that doesn't happen).
Finally -- and this is the key -- pass the interpolated text through
Utils.uncanonstr() so that what we get back will be a unicode, with
any characters outside the lang's charset html-ified. I think this
simplifies matters by always encoding the indices to the charset of
the list's preferred language, at the expense of potentially larger
pages (which I don't care about).
html_TOC(): Add a http-equiv meta tag indicating the charset of this
page, which should fix display for the table of contents. Note that
the various archtoc.html templates need updating but I will check
those changes in next.
HyperArchive.add_article(), .choose_charset(),
.update_dirty_archives(): Removed.
|
| |
|
|
|
|
| |
email.Header should be sufficient. This change uses decode_header()
from email.Header instead of EncWord.decode(). The EncWord.py module
will be removed.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
applied. The problems were twofold:
- The _mlist attribute of Article objects was being pickled, causing
the *-article pickles to be around 10x too big.
- The article template files were being opened and re-read for each
article.
Fixes include pickling only a reference to the mailing list (i.e its
internal name), and caching both the MailList objects and the template
files. Specifically,
quick_maketext(): Front-end to the template cache, this has the same
signature as Utils.maketext(), but it caches as much of the results as
possible.
Article._open_list(): A MailList cache, stolen from Runner.py. Can
you say "re-factor"?
Article.__getstate__(): Don't pickle the _mlist instance, instead,
return an __listname key which contains the internal name of the
mailing list.
Article.__setstate__(): Watch for __listname and call _open_list() to
get a real MailList object.
Everywhere: Use quick_maketext() instead of Utils.make_text() to take
advantage of the template cache.
|
| |
|
|
| |
HyperArch should have nothing to do with it.
|
| |
|
|
|
| |
Apparently pipermail tickles a well-known bug on OSX related to deeply
recursive regular expressions.
|
| |
|
|
|
| |
time. I can't figure out why that's happening but defaulting unlock
to false seemed to take care of the problem... for now. :(
|
| | |
|
| |
|
|
|
| |
HyperArch.Article instead -- which takes two extra constructor
arguments.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sizeof(): Grows a lang argument.
Class Article:
- grows attributes _lang, _mlist
- default self.charset to the server language's charset
- constructor grows a lang and and mlist argument
- new __setstate__() method for backcompat with older (pickled) archives
- as_html(): use i18n.ctime()
- in many places, use standard language templates. All inlined tqs
templates in this file have been removed.
- volNameToDesc(): new
Code cleanup.
Whitespace normalization.
|
| |
|
|
|
| |
In-Reply-To: information in archive mailto urls. Closes bug #443952
reported by Stig Hackvan.
|
| |
|
|
|
| |
Also, use Utils.websafe() consistently throughout, instead of the
inconsistent calls to cgi.escape().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this, you should be able to observe the following effects:
- when reading the mailbox in current mailman, the index will be
windows-1257; there will be lots of garbage MIME text
- when applying my patch, the utf-8 and iso-8859-1 parts of it will
become readable. Japanese and Korean text (in the name of two
message authors) will remain obscure.
- when making available the Japanese MIME charset names, the Japanese
name will become readable (to those which can read Japanese, that is)
- when adding the Korean codecs, the Korean name will also become
readable
- in all cases, the subject encoded x-mvl will remain MIME garbage.
|