<?xml version="1.0" encoding="iso-8859-1"?>

<!-- name="generator" content="pyblosxom/1.4.1 7/27/2007" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
<title>Menno's Musings   </title>
<link>http://freshfoo.com/blog</link>
<description>software | life | whatever</description>
<language>en</language>
<item>
  <title>IMAPClient 0.6.1 released</title>
  <link>http://freshfoo.com/blog/IMAPClient-0.6.1</link>
  <description><![CDATA[
<p>I've just released IMAPClient 0.6.1.</p>
<p>The only functional change in the release is that it now automatically
patches imaplib's IMAP4_SSL class to fix <a class="reference external" href="http://bugs.python.org/issue5949">Python Issue 5949</a>. This is
a bug that's been fixed in later Python 2.6 versions and 2.7 but still
exists in Python versions that are in common use. Without fix this you
may experience hangs when using SSL.</p>
<p>The patch is only applied if the running Python version is known to be
one of the affected versions. It is applied when IMAPClient is
imported.</p>
<p>The only other change in this release is that I've now marked
IMAPClient as &quot;production ready&quot; on PyPI and have updated the README
to match. This was prompted by a request to clarify the current status
of the project and seeing that all current functionality is solid and,
I don't plan to change the existing APIs in backwards-incompatible
ways, I've decided to indicate the project as suitable for production
use.</p>
<p>As always, IMAPClient can be installed from PyPI (<tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span>
<span class="pre">imapclient</span></tt>) or downloaded from the <a class="reference external" href="http://imapclient.freshfoo.com//">IMAPClient site</a>. Feedback, bug
reports and patches are most welcome.</p>

]]></description>
</item>

<item>
  <title>IMAPClient 0.6 released</title>
  <link>http://freshfoo.com/blog/IMAPClient-0.6</link>
  <description><![CDATA[
<p>IMAPClient 0.6 is finally out! Highlights:</p>
<ul class="simple">
<li>Completely new response parsing code. Complex response items like
BODYSTRUCTURE and ENVELOPE are now handled properly and interaction
with the Gmail and MS Exchange IMAP implementations works correctly.</li>
<li>Support for the COPY command</li>
<li>Support for the XLIST extension (used by Gmail)</li>
<li>select_folder() now returns a parsed response containing all
reported details about the selected folder.</li>
<li>the return value from list_folders(), list_sub_folders() and
xlist_folders() now include the IMAP folder flags and
folder delimiter.</li>
<li>Handling of internationalised folder names has been cleaned
up. Folder names now are always returned as unicode strings.</li>
<li>Many bug fixes.</li>
</ul>
<p>Be aware that there have been several API changes with this
release. See the <a class="reference external" href="http://imapclient.freshfoo.com/browser/NEWS">NEWS</a> file for further details.</p>
<p>IMAPClient can be installed from PyPI (<tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">imapclient</span></tt>) or
downloaded from the <a class="reference external" href="http://imapclient.freshfoo.com//">IMAPClient site</a>. As always, feedback, bug
reports and patches are most welcome.</p>
<p>Special thanks goes to <a class="reference external" href="http://starship.python.net/~skippy/">Mark Hammond</a>. 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 <a class="reference external" href="https://mozillalabs.com/raindrop">Raindrop</a>
Mozilla Labs project.</p>

]]></description>
</item>

<item>
  <title>Thunderbird 3 attachment reminder</title>
  <link>http://freshfoo.com/blog/tb3-attachment-reminder</link>
  <description><![CDATA[
<p>I've been using Thunderbird 3 for a while now and one of the features that I
really like is the attachment reminder. It works by looking for specific keywords
you've typed in in the body text.</p>
<div align="center" class="align-center"><img alt="TB3 attachment reminder goodness" class="align-center" src="/images/blog/tb-attached.png" style="width: 584.0px; height: 357.0px;" /></div>
<p>So far I've found that &quot;attached&quot;, &quot;attachment&quot; and &quot;CV&quot; all trigger the
reminder. It's been well thought out in that it is visually obvious but doesn't
get in the way and doesn't steal focus.</p>
<p>Thanks Thunderbird developers. I'm sure this will save me more than once.</p>

]]></description>
</item>

<item>
  <title>TypeError: object.__init__() takes no parameters</title>
  <link>http://freshfoo.com/blog/object__init__takes_no_parameters</link>
  <description><![CDATA[
<p>At my employer we are in the process of migrating from Python 2.4 to
2.6. When running some existing code under Python 2.6 we started
getting DeprecationWarnings about &quot;object.__new__() takes no
parameters&quot; and &quot;object.__init__() takes no parameters&quot;.</p>
<p>A simple example that triggers the warning:</p>
<div class="highlight" ><pre><span class="k">class</span> <span class="nc">MyClass</span>(<span class="nb">object</span>):

    <span class="k">def</span> <span class="nf">__new__</span>(<span class="n">cls</span>, <span class="n">a</span>, <span class="n">b</span>):
        <span class="k">print</span> <span class="s">&#39;MyClass.__new__&#39;</span>, <span class="n">a</span>, <span class="n">b</span>
        <span class="k">return</span> <span class="nb">super</span>(<span class="n">MyClass</span>, <span class="n">cls</span>).<span class="n">__new__</span>(<span class="n">cls</span>, <span class="n">a</span>, <span class="n">b</span>)

    <span class="k">def</span> <span class="nf">__init__</span>(<span class="bp">self</span>, <span class="n">a</span>, <span class="n">b</span>):
        <span class="k">print</span> <span class="s">&#39;MyClass.__init__&#39;</span>, <span class="n">a</span>, <span class="n">b</span>
        <span class="nb">super</span>(<span class="n">MyClass</span>, <span class="bp">self</span>).<span class="n">__init__</span>(<span class="n">a</span>, <span class="n">b</span>)

<span class="n">obj</span> <span class="o">=</span> <span class="n">MyClass</span>(<span class="mi">6</span>, <span class="mi">7</span>)
</pre></div>
<p>This gives:</p>
<pre class="literal-block">
$ python2.4 simple-warning.py
MyClass.__new__ 6 7
MyClass.__init__ 6 7

$ python2.6 simple-warning.py
MyClass.__new__ 6 7
simple-warning.py:5: DeprecationWarning: object.__new__() takes no parameters
  return super(MyClass, cls).__new__(cls, a, b)
MyClass.__init__ 6 7
simple-warning.py:9: DeprecationWarning: object.__init__() takes no parameters
  super(MyClass, self).__init__(a, b)
</pre>
<p>It turns out that a <a class="reference external" href="http://svn.python.org/view?view=rev&amp;revision=54539">change to Python</a> for 2.6 (and 3) means that
object.__new__ and object.__init__ no longer take arguments - a
TypeError is raised when arguments are passed. To avoid breaking too
much pre-existing code, there is a special case that will cause a
DeprecationWarning instead of TypeError if both __init__ and __new__
are overridden. This is the case we were running into with our code at
work.</p>
<p>The reason for this change seems to make enough sense: object doesn't
do anything with arguments to __init__ and __new__ so it shouldn't
accept them. Raising an error when arguments are passed highlights
code where the code might be doing the wrong thing.</p>
<p>Unfortunately this change also breaks Python's multiple inheritance in
a fairly serious way when cooperative <a class="reference external" href="http://docs.python.org/library/functions.html#super">super</a> calls are used. Looking
at the <a class="reference external" href="http://bugs.python.org/issue1683368">ticket</a> for this change, this issue was thought about but
perhaps the implications were not fully understood. Given that using
super with multiple inheritance is common and &quot;correct&quot; practice, it
would seem that this change to Python is a step backwards.</p>
<a href="http://freshfoo.com/blog/object__init__takes_no_parameters">Read more...</a>
]]></description>
</item>

<item>
  <title>rst_break plugin for PyBlosxom</title>
  <link>http://freshfoo.com/blog/rst_break-plugin</link>
  <description><![CDATA[
<p>I just scratched an itch by writing a small plugin for PyBlosxom that
allows the <a class="reference external" href="http://pyblosxom.sourceforge.net/registry/text/rst.html">rst</a> (<a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructured Text</a>) and <a class="reference external" href="http://pyblosxom.sourceforge.net/registry/display/readmore.html">readmore</a> plugins to work
together <a class="footnote-reference" href="#id2" id="id1">[1]</a>. It defines a reST &quot;break&quot; directive which gets transformed
into the breakpoint string the readmore plugin looks out for. This
allows for &quot;Read more...&quot; breaks to be inserted in for reST based
articles.</p>
<p>For further information see the <a class="reference external" href="/code/">Code</a> page here and at the top of the
<a class="reference external" href="/hg/pyblosxom-plugins/trunk/raw-file/9afdcd2bf738/rst_break/rst_break.py">plugin</a> itself.</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>Yes, the audience for this plugin is probably tiny!</td></tr>
</tbody>
</table>

]]></description>
</item>

<item>
  <title>IMAPClient 0.5.2</title>
  <link>http://freshfoo.com/blog/IMAPClient-0.5.2</link>
  <description><![CDATA[
<p>IMAPClient 0.5.2 has just been released. This release fixes 2 bugs
(<a class="reference external" href="http://imapclient.freshfoo.com/ticket/28">#28</a> and <a class="reference external" href="http://imapclient.freshfoo.com/ticket/33">#33</a>).  Much thanks to Fergal Daly and Mark Eichin for
reporting these bugs.</p>
<p>Install from the <a class="reference external" href="/projects/IMAPClient/IMAPClient-0.5.2.tar.gz">tarball</a> or <a class="reference external" href="/projects/IMAPClient/IMAPClient-0.5.2.zip">zip</a> or upgrade using easy_install or pip.</p>

]]></description>
</item>

<item>
  <title>A little thing about cron</title>
  <link>http://freshfoo.com/blog/crontab-updates</link>
  <description><![CDATA[
<p>Here's something I just learned the hard way.</p>
<p>If you edit a crontab with &quot;crontab -e&quot;, cron won't reload the updated
crontab immediately. Changes will be read at 1 second past the next
minute boundary. For example, if you change the crontab at 10:54:32,
cron will reload it at 10:55:01. This means if you're trying to test
how something runs under cron and you're impatient so you set that
thing to run at the next minute, you won't see it run!</p>
<p>I spent a good half hour chasing my tail on this one. Set the
test entry to run 2 minutes ahead instead.</p>

]]></description>
</item>

<item>
  <title>IMAPClient Trac instance now allows for user registrations</title>
  <link>http://freshfoo.com/blog/IMAPClient-Trac_AccountManagerPlugin</link>
  <description><![CDATA[
<p>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?</p>
<p>Since then, I've disabled anonymous ticket creation and have set up
the fantastic <a class="reference external" href="http://trac-hacks.org/wiki/AccountManagerPlugin">AccountManagerPlugin</a> 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.</p>

]]></description>
</item>

<item>
  <title>IMAPClient 0.5.1</title>
  <link>http://freshfoo.com/blog/IMAPClient-0.5.1</link>
  <description><![CDATA[
<p>I've just made a quick point release of IMAPClient. <a class="reference external" href="http://python.net/crew/skippy/">Mark Hammond</a> is
interested in using it for a <a class="reference external" href="https://mozillalabs.com/raindrop">project</a> he's working on but the licenses
(GPL and MPL) were incompatible. I was thinking about <a class="reference external" href="http://imapclient.freshfoo.com/ticket/8">relaxing the
license</a> of IMAPClient anyway so this presented a good opportunity to
make the switch.</p>
<p>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 <a class="reference external" href="http://docs.python.org/library/imaplib.html">imaplib</a> for some functionality. It's looking like
that at some point IMAPClient may not use imaplib at all.</p>
<p>IMAPClient can be installed from PyPI using <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">IMAPClient</span></tt>
or <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">IMAPClient</span></tt>. It can also be downloaded from the
<a class="reference external" href="http://imapclient.freshfoo.com">IMAPClient project page</a>. As
always, feedback and patches are most welcome.</p>

]]></description>
</item>

<item>
  <title>PyBlosxom to Disqus import script</title>
  <link>http://freshfoo.com/blog/disqus-import-script</link>
  <description><![CDATA[
<p>I've had a few requests for the little hack I created to import comments from
PyBlosxom into Disqus. A cleaned up version of disqus-import.py is now on the
<a class="reference external" href="/code/">Code</a> page. There's some docs at the top of the file.</p>

]]></description>
</item>

</channel>
</rss>
