<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for jamesh</title>
    <link>http://www.advogato.org/person/jamesh/</link>
    <description>Advogato blog for jamesh</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Thu, 24 Jul 2008 12:24:53 GMT</pubDate>
    <item>
      <pubDate>Tue, 8 Jul 2008 21:06:27 GMT</pubDate>
      <title>DVCS talks at GUADEC</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=265</link>
      <guid>http://blogs.gnome.org/jamesh/2008/07/09/dvcs-guadec/</guid>
      <description>&lt;p&gt;Yesterday, a BoF was scheduled for discussion of distributed version control systems with GNOME.&#xA0; The BoF session did not end up really discussing the issues of what GNOME needs out of a revision control system, and some of the examples Federico used were a bit snarky.&lt;/p&gt;
&lt;p&gt;We had a more productive meeting in the session afterwards where we went over some of the concrete goals for the system.&#xA0; The list from the blackboard was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contributor collaboration (i.e. let anyone use the tool rather than just core developers).&lt;/li&gt;
&lt;li&gt;Distro &#x21D4; distro and distro &#x21D4; upstream collaboration.&lt;/li&gt;
&lt;li&gt;Host GNOME source code repositories&lt;/li&gt;
&lt;li&gt;Code review&lt;/li&gt;
&lt;li&gt;Server side hooks&lt;/li&gt;
&lt;li&gt;Translators: what to do?&lt;/li&gt;
&lt;li&gt;Enforced checks&lt;/li&gt;
&lt;li&gt;Offline operations&lt;/li&gt;
&lt;li&gt;Documentation authors?&lt;/li&gt;
&lt;li&gt;Support Win32/Mac (important for GTK)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The sys admin tasks were broken down to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MAINTAINERS file syntax checking&lt;/li&gt;
&lt;li&gt;PO file syntax checking&lt;/li&gt;
&lt;li&gt;&lt;a href="http://cia.vc/" &gt;CIA&lt;/a&gt; integration.&lt;/li&gt;
&lt;li&gt;Commits mailing list&lt;/li&gt;
&lt;li&gt;Check that commit messages are not empty&lt;/li&gt;
&lt;li&gt;Trigger updates from commits (e.g. the web site module).&lt;/li&gt;
&lt;li&gt;Release notes tarballs&lt;/li&gt;
&lt;li&gt;&lt;a href="http://l10n.gnome.org/" &gt;Damned Lies&lt;/a&gt; support&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It was clear from the discussion that neither Git or Bazaar satisfied all of the criteria.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Playground&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.gnome.org/johncarr" &gt;John Carr&lt;/a&gt; did a great job setting up Bazaar mirrors of all the GNOME modules.&#xA0; This provided an easy way for people to see play around with Bazaar.&#xA0; However, it only gave you half the experience since it didn&amp;#8217;t provide a way to publish code and collaborate.&lt;/p&gt;
&lt;p&gt;To aid in this, we have set up the &lt;tt&gt;bzr-playground.gnome.org&lt;/tt&gt; machine, which any GNOME developer should be able to use to publish branches based on John&amp;#8217;s imports.&#xA0; Instructions on getting set up can be found &lt;a href="http://live.gnome.org/Bazaar/DemoMachine" &gt;on the wiki&lt;/a&gt;.&#xA0; I hope that we will get a lot of people trying out this infrastructure.&lt;/p&gt;
&lt;p&gt;We gave a presentation today on some of the things Bazaar provides that could be useful when hacking on GNOME.&#xA0; Demoing &lt;tt&gt;bzr-playground&lt;/tt&gt; was a bit problematic due to the internet connection problems at the venue, but I think we still showed some useful tools for local collaboration, searching and code review.&lt;/p&gt;
&lt;p&gt;Meanwhile, &lt;a href="http://www.advogato.org/person/robertc/" &gt;Robert Collins&lt;/a&gt; has been working on some of the GNOME sysadmin features that Bazaar was lacking.&#xA0; Among other things, he got Damned Lies working with both Subversion and Bazaar, with a test installation &lt;a href="http://bzr-playground.gnome.org/damned-lies/" &gt;on the playground machine&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 20 Jun 2008 10:17:02 GMT</pubDate>
      <title>MySQL Announces Move to Bazaar</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=264</link>
      <guid>http://blogs.gnome.org/jamesh/2008/06/20/mysql-bazaar/</guid>
      <description>&lt;p&gt;&lt;a href="http://bazaar-vcs.org/" &gt;&lt;img src="http://blogs.gnome.org/jamesh/files/2008/02/bazaar-logo.png" alt="Bazaar logo" align="right" border="0" height="96" hspace="10" vspace="10" width="94" /&gt;&lt;/a&gt;It has been a while coming, but &lt;a href="http://www.mysql.com/" &gt;MySQL&lt;/a&gt; has &lt;a href="http://blogs.mysql.com/kaj/2008/06/19/version-control-thanks-bitkeeper-welcome-bazaar/" &gt;announced their move to Bazaar&lt;/a&gt; for version control.&#xA0; This has been a long time coming, and it is great to finally see it announced publicly.&lt;/p&gt;
&lt;p&gt;The published Bazaar branches include 8 years of history going back to MySQL 3.23.22, imported from the BitKeeper repositories.&#xA0; So you can see a lot more than just the history since the switch: you can use all the normal Bazaar tools to see where the code came from and how it evolved.&#xA0; Giuseppe Maxia has posted &lt;a href="http://datacharmer.blogspot.com/2008/06/from-bazaar-to-sandbox-in-5-moves.html" &gt;some instructions on how to check out the code&lt;/a&gt; for those who are interested.&lt;/p&gt;
&lt;p&gt;I haven&amp;#8217;t checked extensively, but I wouldn&amp;#8217;t be surprised if this is the largest public code base managed with Bazaar.&#xA0; I&amp;#8217;ve known from personal experience working on Launchpad that it is capable of handling large trees, but it is good to have a high profile project to point at as an example now.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jun 2008 10:17:15 GMT</pubDate>
      <title>How not to do thread local storage with Python</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=263</link>
      <guid>http://blogs.gnome.org/jamesh/2008/06/11/tls-python/</guid>
      <description>&lt;p&gt;The &lt;a href="http://www.python.org/" &gt;Python&lt;/a&gt; standard library contains a function called &lt;tt&gt;thread.get_ident()&lt;/tt&gt;.&#xA0; It will return an integer that uniquely identifies the current thread at that point in time.&#xA0; On most UNIX systems, this will be the &lt;tt&gt;pthread_t&lt;/tt&gt; value returned by &lt;tt&gt;pthread_self()&lt;/tt&gt;.  At first look, this might seem like a good value to key a thread local storage dictionary with.&#xA0; &lt;em&gt;Please&lt;/em&gt; don&amp;#8217;t do that.&lt;/p&gt;
&lt;p&gt;The value uniquely identifies the thread only as long as it is running.&#xA0; The value can be reused after the thread exits.&#xA0; On my system, this happens quite reliably with the following sample program printing the same ID ten times:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;strong&gt;import&lt;/strong&gt; thread, threading

&lt;strong&gt;def&lt;/strong&gt; foo():
&#xA0;   &lt;strong&gt;print&lt;/strong&gt; &amp;#8216;Thread ID:&amp;#8217;, thread.get_ident()

&lt;strong&gt;for&lt;/strong&gt; i &lt;strong&gt;in&lt;/strong&gt; range(10):
&#xA0;   t = threading.Thread(target=foo)
&#xA0;   t.start()
&#xA0;   t.join()&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the return value of &lt;tt&gt;thread.get_ident()&lt;/tt&gt; was used to key thread local storage, all ten threads would share the same storage.  This is not generally considered to be desirable behaviour.&lt;/p&gt;
&lt;p&gt;Assuming that you can depend on Python 2.4 (released 3.5 years ago), then just use a &lt;a href="http://www.python.org/doc/current/lib/module-threading.html" &gt;&lt;tt&gt;threading.local&lt;/tt&gt;&lt;/a&gt; object.  It will result in simpler code, correctly handle serially created threads, and you won&amp;#8217;t hold onto TLS data past the exit of a thread.&lt;/p&gt;
&lt;p&gt;You will save yourself (or another developer) a lot of time at some point in the future.  Debugging these problems is not fun when you combine code doing proper TLS with other code doing broken TLS.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 26 May 2008 23:06:36 GMT</pubDate>
      <title>Prague</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=262</link>
      <guid>http://blogs.gnome.org/jamesh/2008/05/19/prague/</guid>
      <description>&lt;p&gt;I arrived in Prague yesterday for the &lt;a href="https://wiki.ubuntu.com/UDS-Intrepid" &gt;Ubuntu Developer Summit&lt;/a&gt;.&#xA0; Including time spent in transit in Singapore and London, the flights took about 30 hours.&lt;/p&gt;
&lt;p&gt;As I was flying on BA, I got to experience &lt;a href="http://en.wikipedia.org/wiki/Heathrow_Terminal_5_building" &gt;Heathrow Terminal 5&lt;/a&gt;. It wasn&amp;#8217;t quite as bad as some of the horror stories I&amp;#8217;d heard.&#xA0; There were definitely aspects that weren&amp;#8217;t forgiving of mistakes.&#xA0; For example, when taking the train to the &amp;#8220;B&amp;#8221; section there was a sign saying that if you accidentally got on the train when you shouldn&amp;#8217;t have it would take 40 minutes to get back to the &amp;#8220;A&amp;#8221; section.&lt;/p&gt;
&lt;p&gt;It is also quite difficult to find water fountains in the terminal, which is inexcusable given that they don&amp;#8217;t let people bring their own water bottles.&lt;/p&gt;
&lt;p&gt;I had been a bit worried that they&amp;#8217;d lose my bag, but it arrived okay in Prague.&#xA0; &lt;a href="http://mumak.net/" &gt;Jonathan&lt;/a&gt; was not so lucky.&lt;/p&gt;
&lt;p&gt;As well as the Ubuntu and Canonical folks, there are a bunch of Gnome developers here, including &lt;a href="http://blogs.gnome.org/desrt" &gt;Ryan&lt;/a&gt;, &lt;a href="http://www.murrayc.com/blog" &gt;Murray&lt;/a&gt;, &lt;a href="http://blogs.gnome.org/ovitters" &gt;Olav&lt;/a&gt;, &lt;a href="http://blog.fubar.dk/" &gt;David&lt;/a&gt; and &lt;a href="http://0pointer.de/blog" &gt;Lennart&lt;/a&gt;.&#xA0; It will be an interesting week.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 26 May 2008 23:06:36 GMT</pubDate>
      <title>bzr commit &#x2013;author</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=261</link>
      <guid>http://blogs.gnome.org/jamesh/2008/05/12/bzr-commit-author/</guid>
      <description>&lt;p&gt;One of the features I recently discovered in &lt;a href="http://bazaar-vcs.org/" &gt;Bazaar&lt;/a&gt; is the &lt;tt&gt;&amp;#8211;author&lt;/tt&gt; option for &amp;#8220;&lt;tt&gt;bzr commit&lt;/tt&gt;&amp;#8220;.&#xA0; This lets you make commits to a Bazaar branch on behalf of another person.&#xA0; When used, the new revision credits two people: you as the committer and the other person as the author.&lt;/p&gt;
&lt;p&gt;While Bazaar does make it easy for non-core contributors to send changes in a form that correctly attributes them (e.g. by publishing a branch or sending a bundle), I doubt we&amp;#8217;ll ever see the end of pure patches.&#xA0; Some cases include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Patches based on a tarball release. &#xA0; In these cases the contributor likely hasn&amp;#8217;t even used the VCS.&lt;/li&gt;
&lt;li&gt;People send simple diffs from e.g. &amp;#8220;&lt;tt&gt;bzr diff&lt;/tt&gt;&amp;#8221; since that is sometimes the easiest solution (or what they do by default due to having transferred their knowledge from another VCS).&lt;/li&gt;
&lt;li&gt;Some people use a VCS bridge so they can work with their favourite VCS.&#xA0; They might not be able to provide their changes as Bazaar commits due to this.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;tt&gt;&amp;#8211;author&lt;/tt&gt; option lets you commit these changes in a way that credits the contributor for their work.&#xA0; The author of the change will then be displayed in &amp;#8220;&lt;tt&gt;bzr annotate&lt;/tt&gt;&amp;#8221; output and credited along with the you in the &amp;#8220;&lt;tt&gt;bzr log&lt;/tt&gt;&amp;#8221; output.&lt;/p&gt;
&lt;p&gt;The feature is also used by a number of plugins such as &lt;a href="https://launchpad.net/bzr-rebase" &gt;bzr-rebase&lt;/a&gt;: if you replay or rebase someone else&amp;#8217;s changes, the new revisions will creit you as the committer and the original committer as the author.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 1 May 2008 10:16:02 GMT</pubDate>
      <title>SSL caching on Firefox 3</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=260</link>
      <guid>http://blogs.gnome.org/jamesh/2008/05/01/firefox-ssl/</guid>
      <description>&lt;p&gt;Since upgrading to &lt;a href="http://www.ubuntu.com/products/whatisubuntu/804features/" &gt;Ubuntu Hardy&lt;/a&gt;, I&amp;#8217;ve been enjoying using &lt;a href="http://wiki.mozilla.org/Firefox3" &gt;Firefox 3&lt;/a&gt;.&#xA0; The reduced memory usage has made a lot of other things nicer to use (I don&amp;#8217;t feel like I need to buy more memory now).&#xA0; One thing that is nice to see fixed is caching of SSL content.&lt;/p&gt;
&lt;p&gt;In previous versions of Firefox, SSL content was never cached to disk with the default settings.&#xA0; While you certainly don&amp;#8217;t want all SSL content to be written to disk, a lot of it can be cached without problem.&#xA0; For example, it is important that the CSS and JavaScript for a page be served via SSL to avoid man in the middle attacks (injecting arbitrary active content into a secure page is bad), but there isn&amp;#8217;t much harm in caching them to disk: if the attacker can modify the disk cache then SSL probably doesn&amp;#8217;t matter much.&lt;/p&gt;
&lt;p&gt;Now it was possible to turn on disk caching in Firefox 2 through the &lt;a href="http://kb.mozillazine.org/Browser.cache.disk_cache_ssl" &gt;browser.cache.disk_cache_ssl&lt;/a&gt; hidden option, but it had a serious drawback: the security information for resources was not saved in the disk cache so you&amp;#8217;d get a broken padlock if resources were loaded from the cache.&lt;/p&gt;
&lt;p&gt;Firefox 3 fixes up the disk cache to record the security information though, so turning on disk_cache_ssl setting no longer results in a broken padlock.&#xA0; But what about all the people using Firefox with its default settings (or those who do not want all SSL content cached to disk)?&#xA0; For these users, the web server can still cause some content to be cached.&lt;/p&gt;
&lt;p&gt;By sending the &amp;#8220;&lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9" &gt;Cache-Control&lt;/a&gt;: public&amp;#8221; response header, the server can say that a resource can be stored in the disk cache.&#xA0; Firefox 3 will respect this irrespective of the disk_cache_ssl setting.&#xA0; This should bring Firefox back into parity with Internet Explorer with respect to network&#xA0; performance on SSL web sites.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Mon, 28 Apr 2008 15:10:42 GMT</pubDate>
      <title>Psycopg migrated to Bazaar</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=259</link>
      <guid>http://blogs.gnome.org/jamesh/2008/04/28/psycopg-migrated-to-bazaar/</guid>
      <description>&lt;p&gt;Last week we moved psycopg from &lt;a href="http://subversion.tigris.org/" &gt;Subversion&lt;/a&gt; to &lt;a href="http://bazaar-vcs.org/" &gt;Bazaar&lt;/a&gt;.&#xA0; I did the migration using &lt;a href="http://blog.labix.org/" &gt;Gustavo Niemeyer&lt;/a&gt;&amp;#8217;s &lt;a href="https://launchpad.net/svn2bzr" &gt;svn2bzr&lt;/a&gt; tool with a few tweaks to map the old Subversion committer IDs to the email address form conventionally used by Bazaar.&lt;/p&gt;
&lt;p&gt;The tool does a good job of following tree copies and create related Bazaar branches.&#xA0; It doesn&amp;#8217;t have any special handling for stuff in the tags/ directory (it produces new branches, as it does for other tree copies).&#xA0; To get real Bazaar tags, I wrote a &lt;a href="http://people.ubuntu.com/~jamesh/add-tags.py" &gt;simple post-processing script&lt;/a&gt; to calculate the heads of all the branches in a tags/ directory and set them as tags in another branch (provided those revisions occur in its ancestry).&#xA0; This worked pretty well except for a few revisions synthesised by a previous cvs2svn migration.&#xA0; As these tags were from pretty old psycopg 1 releases I don&amp;#8217;t know how much it matters.&lt;/p&gt;
&lt;p&gt;As there is no code browsing set up on initd.org yet, I set up mirrors of the 2.0.x and 1.x branches on &lt;a href="https://launchpad.net/" &gt;Launchpad&lt;/a&gt; to do this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://bazaar.launchpad.net/~psycopg/psycopg/2.0.x/" &gt;http://bazaar.launchpad.net/~psycopg/psycopg/2.0.x/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bazaar.launchpad.net/~psycopg/psycopg/1.x/" &gt;http://bazaar.launchpad.net/~psycopg/psycopg/1.x/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is pretty cool having access to the entire revision history locally, and should make it easier to maintain full credit for contributions from non-core developers.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 15 Apr 2008 07:05:24 GMT</pubDate>
      <title>Psycopg2 2.0.7 Released</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=258</link>
      <guid>http://blogs.gnome.org/jamesh/2008/04/15/psycopg2/</guid>
      <description>&lt;p&gt;Yesterday Federico &lt;a href="http://lists.initd.org/pipermail/psycopg/2008-April/006013.html" &gt;released version 2.0.7 of psycopg2&lt;/a&gt; (a &lt;a href="http://www.python.org/" &gt;Python&lt;/a&gt; database adapter for &lt;a href="http://www.postgresql.org/" &gt;PostgreSQL&lt;/a&gt;).&#xA0; I made a fair number of the changes in this release to make it more usable for some of &lt;a href="http://www.canonical.com/" &gt;Canonical&lt;/a&gt;&amp;#8217;s applications.&#xA0; The new release should work with the development version of Storm, and shouldn&amp;#8217;t be too difficult to get everything working with other frameworks.&lt;/p&gt;
&lt;p&gt;Some of the improvements include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Better selection of exceptions based on the &lt;a href="http://www.postgresql.org/docs/current/static/errcodes-appendix.html" &gt;SQLSTATE&lt;/a&gt; result field.&#xA0; This causes a number of errors that were reported as ProgrammingError to use a more appropriate exception (e.g. DataError, OperationalError, InternalError).&#xA0; This was the change that broke Storm&amp;#8217;s test suite as it was checking for ProgrammingError on some queries that were clearly not programming errors.&lt;/li&gt;
&lt;li&gt;Proper error reporting for commit() and rollback(). These methods now use the same error reporting code paths as execute(), so an integrity error on commit() will now raise IntegrityError rather than OperationalError.&lt;/li&gt;
&lt;li&gt;The compile-time switch that controls whether the display_size member of Cursor.description is calculated is now turned off by default.&#xA0; The code was quite expensive and the field is of limited use (and not provided by a number of other database adapters).&lt;/li&gt;
&lt;li&gt;New QueryCanceledError and TransactionRollbackError exceptions.&#xA0; The first is useful for handling queries that are canceled by &lt;a href="http://www.postgresql.org/docs/8.3/static/runtime-config-client.html#GUC-STATEMENT-TIMEOUT" &gt;statement_timeout&lt;/a&gt;.&#xA0; The second provides a convenient way to catch serialisation failures and deadlocks: errors that indicate the transaction should be retried.&lt;/li&gt;
&lt;li&gt;Fixes for a few memory leaks and GIL misuses. One of the leaks was in the notice processing code that could be particularly problematic for long-running daemon processes.&lt;/li&gt;
&lt;li&gt;Better test coverage and a driver script to run the entire test suite in one go.&#xA0; The tests should all pass too, provided your database cluster uses unicode (there was a report just before the release of one test failing for a LATIN1 cluster).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;#8217;re using previous versions of psycopg2, I&amp;#8217;d highly recommend upgrading to this release.&lt;/p&gt;
&lt;p&gt;Future work will probably involve support for the DB-API two phase commit extension, but I don&amp;#8217;t know when I&amp;#8217;ll have time to get to that.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 10 Apr 2008 13:03:55 GMT</pubDate>
      <title>Honey Bock Results</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=257</link>
      <guid>http://blogs.gnome.org/jamesh/2008/04/10/honey-bock-results/</guid>
      <description>&lt;p&gt;Since bottling the &lt;a href="http://blogs.gnome.org/jamesh/2008/03/06/honey-bock/" &gt;honey bock&lt;/a&gt; last month, I&amp;#8217;ve tried a bottle last week and this week.  While it is a very nice beer, the honey flavour is not very noticeable.  That said, the second bottle I tried had a slightly stronger honey flavour than the first so it might just need to mature for another month or so.&lt;/p&gt;
&lt;p&gt;If I was to do this beer again, it would make sense to use a stronger flavoured honey or just use more honey.  Then again, perhaps it isn&amp;#8217;t worth trying honey flavoured dark beers.&lt;/p&gt;
&lt;p&gt;One beer I&amp;#8217;d like to make again is &lt;a href="http://blogs.gnome.org/jamesh/2006/12/11/chilli-beer/" &gt;Chilli Beer&lt;/a&gt;.&#xA0; I haven&amp;#8217;t seen any commercial equivalent to it, and it was great on a hot summer afternoon.&#xA0; Since there were chilli pieces in the bottles of the last batch, it got hotter as it matured.&#xA0; It is an interesting experience where taking a sip of the beer cools your moth down, but it starts heating up again once you swallow.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 2 Apr 2008 09:05:03 GMT</pubDate>
      <title>Using email addresses as OpenID identities (almost)</title>
      <link>http://www.advogato.org/person/jamesh/diary.html?start=256</link>
      <guid>http://blogs.gnome.org/jamesh/2008/04/02/openid-email/</guid>
      <description>&lt;p&gt;On the &lt;a href="http://openid.net/" &gt;OpenID&lt;/a&gt; specs mailing list, there was another discussion about using email addresses as OpenID identifiers.  So far it has mostly covered existing ground, but there was one comment that interested me: a report that &lt;a href="http://openid.net/pipermail/specs/2008-April/002274.html" &gt;you can log in to many OpenID &lt;acronym title="Relying Party"&gt;RP&lt;/acronym&gt;s by entering a Yahoo email address&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now there certainly isn&amp;#8217;t any Yahoo-specific code in the standard OpenID libraries, so you might wonder what is going on here.  We can get some idea by using the python-openid library:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;gt;&amp;gt;&amp;gt; from openid.consumer.discover import discover
&amp;gt;&amp;gt;&amp;gt; claimed_id, services = discover('example@yahoo.com')
&amp;gt;&amp;gt;&amp;gt; claimed_id
'http://www.yahoo.com/'
&amp;gt;&amp;gt;&amp;gt; services[0].type_uris
['http://specs.openid.net/auth/2.0/server',
 'http://specs.openid.net/extensions/pape/1.0']
&amp;gt;&amp;gt;&amp;gt; services[0].server_url
'https://open.login.yahooapis.com/openid/op/auth'
&amp;gt;&amp;gt;&amp;gt; services[0].isOPIdentifier()
True&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;So we can see that running the discovery algorithm on the email address has resulted in Yahoo&amp;#8217;s standard identifier select endpoint.  What we&amp;#8217;ve actually seen here is the effect of &lt;a href="http://openid.net/specs/openid-authentication-2_0.html#normalization" &gt;Section 7.2&lt;/a&gt; at work:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt; 3. Otherwise, the input SHOULD be treated as an http URL; if it does not include a &amp;#8220;http&amp;#8221; or &amp;#8220;https&amp;#8221; scheme, the Identifier MUST be prefixed with the string &amp;#8220;http://&amp;#8221;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So the email address is normalised to the URL &lt;a href="http://example@yahoo.com" &gt;http://example@yahoo.com&lt;/a&gt; (which is treated the same as &lt;a href="http://yahoo.com/" &gt;http://yahoo.com/&lt;/a&gt;), which is then used for discovery.  As shown above, this results in an identifier select request so works for all Yahoo users.&lt;/p&gt;
&lt;p&gt;I wonder if the Yahoo developers realised that this would happen and set things up accordingly?  If not, then this is a happy accident.  It isn&amp;#8217;t quite the same as having support for email addresses in OpenID since the user may end up having to enter their email address a second time in the &lt;acronym title="OpenID Provider"&gt;OP&lt;/acronym&gt; if they don&amp;#8217;t already have a session cookie.&lt;/p&gt;
&lt;p&gt;It is certainly better than the RP presenting an error if the user accidentally enters an email address into the identity field.  It seems like something that any OP offering email addresses to its users should implement.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
