| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
unpickled Articles.
getArticle(): Do just that.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
mailbox processing. It's good enough for the caller of this code to
do the exception handling.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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. :(
|
| | |
|
| |
|
|
| |
argument.
|
| |
|
|
|
| |
HyperArch.Article instead -- which takes two extra constructor
arguments.
|
| | |
|
| |
|
|
|
|
|
|
| |
article class as an argument. Instead call out to an override-able
method _makeArticle() to return the article instance. This will be
overridden in HyperArch.py.
Bump __version__ while we're at it.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
just confuses people and the traceback is enough information.
|
| |
|
|
|
|
| |
the base class's .next() method will never raise them (it's factory
masks them). However, the end condition is now that "m is None"
instead of m being false.
|
| |
|
|
|
| |
In-Reply-To: information in archive mailto urls. Closes bug #443952
reported by Stig Hackvan.
|
| |
|
|
|
| |
iteration, provide some more useful information in the logs/error
file.
|
| |
|
|
|
| |
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.
|
| |
|
|
| |
index.html unless there isn't already an index.html file there!
|
| |
|
|
|
|
|
|
| |
as a last resort, if no valid email address could be retrieved from
the From: line. Previously it would always defer to the Reply-To:
address with unintended side effects.
Closes SF bug #224274.
|
| |
|
|
|
| |
skipping or processing loops. They usually mean MIME boundary
problems, which legit email rarely has.
|
| | |
|
| |
|
|
|
|
|
| |
can fast forward past a bunch of messages in the mailbox. This will
be used by bin/arch to process a huge .mbox file in chunks (manually).
Not fully tested, but it seems to work.
|
| |
|
|
|
| |
slash to avoid an http redirect and second query. However, just add
it if it's not already there.
|
| | |
|
| |
|
|
|
|
| |
Don't use PUBLIC_ARCHIVE_FILE_DIR and PRIVATE_ARCHIVE_FILE_DIR
directly, use the archive_dir() method or the Site module methods
instead.
|
| | |
|
| |
|
|
| |
Pychecker. Removed some unused local variables.
|
| |
|
|
|
|
|
| |
that the failure of one won't prevent the attempt of the other. This
fixes a problem reported by Dan Buchmann where upgrades fail if there
are pre-MM2.1a4 lists that have not received a posting before the
upgrade to MM2.1a4.
|
| | |
|
| |
|
|
|
|
|
|
| |
the archive url before the first message has been posted to the list.
InitVars(): Write an initial index.html file which just states that
the archive is currently empty. Template comes from
emptyarchive.html.
|
| |
|
|
| |
deprecated in Python 2.2, in favor of our good ol' standard LockFile.
|
| |
|
|
|
| |
printed in VERBOSE mode (i.e. running bin/arch). Print out a
message counter and the Message-ID: of the message being processed.
|
| |
|
|
|
| |
author line are always html-escaped. This fixes index summaries for
messages with html in their Subject: line for instance.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some time ago, someone complained about the pipermail not representing
proper charset in the Content-Type header. Here is a patch for the
latest CVS (2.1a).
With some changes by Barry, specifically to get the charset parameter
out of the Content-Type: header using email.Message's interface
instead of regexp searching.
Please double check this for me!
|
| |
|
|
|
|
|
| |
containing a %(hostname)s interpolation string. This gets filled in
with the list's hostname, which is calculated from a reverse lookup in
VIRTUAL_HOSTS using self.host_name as the key. Failing that,
DEFAULT_URL_HOST is used.
|
| |
|
|
|
|
| |
UnixMailbox. The main difference being we pass in the MailList
instance to the constructor, so all the magic of the message scrubber
can work.
|
| |
|
|
|
|
|
| |
import cPickle as pickle
Convert to use email package so we're dealing with one kind of Message
object.
|
| |
|
|
| |
Also, remove pickle import since it doesn't seem to be used anywhere.
|
| |
|
|
|
|
| |
to be a template into which %(listname)s will be interpolated. This
makes it possible to set PUBLIC_ARCHIVE_URL to something that's
appropriate for (hopefully) any external archiver.
|
| |
|
|
| |
module. Also, we don't need the string module.
|