Tue, 11 May 2010

IMAPClient 0.6 released

IMAPClient 0.6 is finally out! Highlights:

Be aware that there have been several API changes with this release. See the NEWS file for further details.

IMAPClient can be installed from PyPI (pip install imapclient) or downloaded from the IMAPClient site. As always, feedback, bug reports and patches are most welcome.

Special thanks goes to Mark Hammond. He has contributed a significant amount of code and effort to this release. Incidentally, Mark is using IMAPClient as part of the backend for the Raindrop Mozilla Labs project.

posted at: 13:45 | permalink | comments

Sun, 24 Jan 2010

IMAPClient 0.5.2

IMAPClient 0.5.2 has just been released. This release fixes 2 bugs (#28 and #33). Much thanks to Fergal Daly and Mark Eichin for reporting these bugs.

Install from the tarball or zip or upgrade using easy_install or pip.

posted at: 17:58 | permalink | comments

Sat, 26 Dec 2009

IMAPClient Trac instance now allows for user registrations

I've had several requests over the last few weeks to open up the IMAPClient Trac instance so that anyone can submit tickets. Initially I changed access levels so that anoymous users could create tickets. This turned out to be fairly inflexible: it doesn't allow people to add attachments or modify tickets later. This approach also resulted in one strange ticket being created where all fields were filled with random characters - a bot looking for buffer overruns?

Since then, I've disabled anonymous ticket creation and have set up the fantastic AccountManagerPlugin which allows people to register accounts for themselves. Once someone has created an account and logged in they can create and modify tickets. I have a feeling I'm going to have to turn on the optional CAPTCHA support, but I'm willing to see how it goes for a while first.

posted at: 15:54 | permalink | comments

Tue, 15 Dec 2009

IMAPClient 0.5.1

I've just made a quick point release of IMAPClient. Mark Hammond is interested in using it for a project he's working on but the licenses (GPL and MPL) were incompatible. I was thinking about relaxing the license of IMAPClient anyway so this presented a good opportunity to make the switch.

Work on the 0.6 release is coming along. This version will fix a number issues with parsing of FETCH responses - the FETCH parsing code is being completely rewritten. This is the first time that IMAPClient will bypass most of imaplib for some functionality. It's looking like that at some point IMAPClient may not use imaplib at all.

IMAPClient can be installed from PyPI using pip install IMAPClient or easy_install IMAPClient. It can also be downloaded from the IMAPClient project page. As always, feedback and patches are most welcome.

posted at: 22:05 | permalink | comments

Sun, 18 Oct 2009

IMAPClient has a new home

I've just (finally) finished setting up a proper website for IMAPClient. The new home for the project is http://imapclient.freshfoo.com/.

It's a Trac instance with Mercurial support that monitors the main trunk repository. All items from the TODO file in the source have been converted to tickets in the bug tracker. I've even created a hokey little logo.

Let me know me know if anything looks broken.

Time to work on some long-standing bugs...

posted at: 17:12 | permalink | comments

Fri, 28 Aug 2009

Problem installing Trac under Lighttpd+FastCGI

I just finished configuring a Trac instance for IMAPClient. To keep page response times tolerable I'm using FastCGI.

It turns out there's a little gotcha when you serve an app at the root (ie. "/") using FastCGI with Lighttpd. It passes the wrong SCRIPT_NAME and PATH_INFO to the app causing unexpected behaviour. The problem isn't there if the app is served from a prefix (eg. "/trac").

The problem is apparently fixed somewhere in Lighttpd 1.5 but I'm on 1.4.13 as shipped with Debian.

With Trac there is a workaround. If you modify Trac's FastCGI runner (fcgi_frontend.py) to correct the SCRIPT_NAME and PATH_INFO environment variables before the rest of the app sees them, the problem is solved. Here's what my fcgi_frontend.py now looks like (header comments removed):

import pkg_resources

from trac import __version__ as VERSION
from trac.web.main import dispatch_request

from os import environ
import _fcgi

def application(environ, start_request):
    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
    environ['SCRIPT_NAME'] = ''
    return dispatch_request(environ, start_request)

def run():
    _fcgi.WSGIServer(application).run()

if __name__ == '__main__':
    pkg_resources.require('Trac==%s' % VERSION)
    run()

Figuring this out cost me lots of time. Hopefully this information helps someone else out.

Relevant links:

posted at: 01:46 | permalink | comments

Wed, 29 Apr 2009

Announcing IMAPClient 0.5

It's been a long time between releases but I've just released IMAPClient 0.5.

From the NEWS file:

Folder names are now encoded and decoded transparently if required (using modified UTF-7). This means that any methods that return folder names may return unicode objects as well as normal strings [API CHANGE]. Additionally, any method that takes a folder name now accepts unicode object too. Use the folder_encode attribute to control whether encode/decoding is performed.

Unquoted folder names in server responses are now handled correctly. Thanks to Neil Martinsen-Burrell for reporting this bug.

Fixed a bug with handling of unusual characters in folder names.

Timezones are now handled correctly for datetimes passed as input and for server responses. This fixes a number of bugs with timezones. Returned datetimes are always in the client's local timezone [API CHANGE].

Many more unit tests, some using Michael Foord's excellent mock.py. (http://www.voidspace.org.uk/python/mock/)

IMAPClient can be installed from PyPI using easy_install IMAPClient or downloaded from my Code page. As always, feedback and patches are most welcome.

posted at: 00:54 | permalink | comments

Fri, 11 Jan 2008

Announcing IMAPClient 0.4

I've just released IMAPClient 0.4. Changes are:

Many thanks to Helder Guerreiro for contributing patches for some of the features in this release.

IMAPClient can be installed from PyPI using easy_install IMAPClient or downloaded from my Code page. As always, feedback and patches are most welcome

posted at: 22:58 | permalink | comments

Tue, 16 Oct 2007

Announcing IMAPClient 0.3

I've just made a new release of IMAPClient (0.3). Changes are:

IMAPClient can be installed from PyPI using easy_install IMAPClient or downloaded from my Code page. As always, feedback and patches are most welcome

posted at: 15:20 | permalink | comments

Wed, 02 May 2007

Introducing imapclient

Today I released the first versions of imapclient, an IMAP4 client library I've been working on. From the README:

imapclient aims to be a easy-to-use, Pythonic and complete IMAP client library with no dependencies outside the Python standard library. Features:
  • Arguments and return values are natural Python types.
  • IMAP server responses are fully parsed and readily useable.
  • IMAP unique message IDs (UIDs) are handled transparently. There is no need to call different methods to use UIDs.
  • Convenience methods are provided for commonly used functionality.
  • Exceptions are raised when errors occur.

imapclient makes IMAP useable from Python with little effort. If you've used the imaplib module from the standard library, you'll know that a lot of supporting code is needed just to get simple things done. I'd wager that everyone who has used imaplib has their own fragile regexes and management code to go with it. I hope that imapclient will put an end to this.

imapclient can be downloaded from my Code page. Feedback and patches most welcome!

posted at: 21:08 | permalink | comments