<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Metaprogramming and Politics</title>
	<atom:link href="http://tetamap.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tetamap.wordpress.com</link>
	<description>Decentralize. Take the red pill.</description>
	<lastBuildDate>Sat, 28 Jan 2012 00:19:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tetamap.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/b3a31bdc09d8a9d15ba87f69d34ece75?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Metaprogramming and Politics</title>
		<link>http://tetamap.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tetamap.wordpress.com/osd.xml" title="Metaprogramming and Politics" />
	<atom:link rel='hub' href='http://tetamap.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Why privacy matters and State Secrecy not</title>
		<link>http://tetamap.wordpress.com/2010/12/05/why-privacy-matters-and-state-secrecy-not/</link>
		<comments>http://tetamap.wordpress.com/2010/12/05/why-privacy-matters-and-state-secrecy-not/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 19:34:20 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[wikileaks]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=297</guid>
		<description><![CDATA[Today i saw a woman&#8217;s german article on how she wouldn&#8217;t want reports about her sex life spread through wikileaks. I wouldn&#8217;t like that either. But i see it as a misconception and confusion about two very different issues, namely personal privacy and state/government secrecy. This confusion is used and increased by many politicians for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=297&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today i saw a woman&#8217;s <a href="http://jetzt.sueddeutsche.de/texte/anzeigen/515365">german article</a> on how she wouldn&#8217;t want reports about her sex life spread  through wikileaks. I wouldn&#8217;t like that either.  But i see it as a misconception and confusion about two very different issues, namely personal privacy and state/government secrecy.  This confusion is used and increased by many politicians for their own purposes. </p>
<p>Privacy means our rights to have a private life, private flat, private actions and private communications.  We don&#8217;t want the state or the public to surveil us or intrude our private world unless they can show evidence to an independent court that there is something criminal going on. </p>
<p>State secrecy denotes making secret deals, performing secret communication with and secret actions against people or other states. Secret actions can naturally not be discussed in the public and are exempt from our judgement when electing officials. Increasing state secrecy very quickly leads to inner circles wielding great power. The 20th century has tons of bad examples. </p>
<p>Therefore I refuse the notion that if am positive about privacy i must also be ok with state secrecy.  Or if i want a transparent government that i also must be ok with total surveillance of my private life.  <strong>No way. </strong> Likely it&#8217;s rather true that the more transparent a government is the more secure i can feel with respect to my privacy.</p>
<p>On a sidenote, this all relates to a point in the <a href="http://dasalte.ccc.de/hackerethics?language=en">hacker ethics</a> made by Wau Holland and the Chaos Computer Club a long time ago: &#8220;Make public data available, protect private data.&#8221;  </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/297/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=297&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2010/12/05/why-privacy-matters-and-state-secrecy-not/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Wikileaks or: Welcome to the brave new &#8220;Terms of Use&#8221; era</title>
		<link>http://tetamap.wordpress.com/2010/12/04/wikileaks-or-welcome-to-the-brave-new-terms-of-use-era/</link>
		<comments>http://tetamap.wordpress.com/2010/12/04/wikileaks-or-welcome-to-the-brave-new-terms-of-use-era/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 15:11:47 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[wikileaks]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=291</guid>
		<description><![CDATA[Paypal &#8220;restricts&#8221; the bank account of the german Wau Holland foundation which managed parts of Wikileaks transactions. Citing from their statement : PayPal has permanently restricted the account used by WikiLeaks due to a violation of the PayPal Acceptable Use Policy, which states that our payment service cannot be used for any activities that encourage, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=291&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Paypal &#8220;restricts&#8221; the bank account of the german Wau Holland foundation which managed parts of Wikileaks transactions.  Citing from <a href="http://www.readwriteweb.com/archives/paypal_announces_it_will_no_longer_handle_wikileak.php">their statement </a>:</p>
<blockquote><p>
    PayPal has permanently restricted the account used by WikiLeaks due to<br />
    a violation of the PayPal Acceptable Use Policy, which states that<br />
    our payment service cannot be used for any activities that<br />
    encourage, promote, facilitate or instruct others to engage in<br />
    illegal activity. We&#8217;ve notified the account holder of this action.
</p></blockquote>
<p>As with my <a href="http://tetamap.wordpress.com/2010/12/03/who-needs-censorship-if-you-have-amazon-and-everydns/">yesterday notes</a> a number of questions arise.  What exactly is<br />
illegal about wikileaks behaviour in the US? Was money laundering or<br />
online fraud involved?  Was wikileaks given a warning and asked to<br />
provide clarifying statements regarding the usage of _their_ money?  Do<br />
they apply the same moral standards to all their customers and accounts?<br />
For example, are they also closing all accounts related to the<br />
Washington Times or related to Sarah Palin <a href="http://www.washingtontimes.com/news/2010/dec/2/assassinate-assange/">publically calling for<br />
assasination</a> of a citizen of Australia?  </p>
<p>If we are learning anything from the Wikileaks case it is the willfullness<br />
of young IT companies in the US to concur with public opinion or direct<br />
government pressure.  Up until now i presumed the likes of Amazon or Paypal<br />
also incorporated some ethics.  And this would mandate IMO to keep<br />
distance to government actions and to resist government pressure especially<br />
if it&#8217;s about something like wikileaks.  It seems like the US goverment<br />
used its advanced notice of the pending publication wisely:  rather than filtering critical<br />
messages they organised a huge campaign in the US resulting in Amazon,<br />
PayPal and everydns and probably others to implement government policies<br />
and quickly.  No need to have special laws or evil government actions &#8211; just reference the Terms of Use and be done.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=291&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2010/12/04/wikileaks-or-welcome-to-the-brave-new-terms-of-use-era/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Who needs censorship if you have Amazon and everydns?</title>
		<link>http://tetamap.wordpress.com/2010/12/03/who-needs-censorship-if-you-have-amazon-and-everydns/</link>
		<comments>http://tetamap.wordpress.com/2010/12/03/who-needs-censorship-if-you-have-amazon-and-everydns/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 12:44:03 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=281</guid>
		<description><![CDATA[Yesterday Amazon stopped services for the wikileaks archive. Citing from the Amazon statement: It is not credible that the extraordinary volume of 250,000 classified documents that WikiLeaks is publishing could have been carefully redacted in such a way as to ensure that they weren’t putting innocent people in jeopardy. So here you have a popular [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=281&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday Amazon stopped services for the wikileaks archive. Citing from the<a href="http://aws.amazon.com/message/65348/"> Amazon statement</a>:</p>
<blockquote><p>It is not credible that the extraordinary volume of 250,000 classified documents that WikiLeaks is publishing could have been carefully redacted in such a way as to ensure that they weren’t putting innocent people in jeopardy.
</p></blockquote>
<p>So here you have a popular cloud services provider judging their customers content in a broad manner, stating conclusion, terminate services, done.  Did they allow discussion?  Do journalists need to keep and control all rights of the material they are publishing?  Can Amazon show any evidenceof their &#8220;jeopardy&#8221; conclusion? Would they apply the same moral standard to e.g. blogs or other (journalistic) content that called for going to the war on Iraq &#8211; causing &gt;100.000 civilians to die?  Does Amazon really want us to believe the US governments outrage and Mr. Liebermanns actions are merely a co-incidence? </p>
<p>Then today everydns.net terminated DNS services for wikileaks.org with a 24 hour prior notice. Citing from the <a href="http://www.skepticgeek.com/miscellaneous/everydns-net-terminates-wikileaks-dns-services/">everydns statement</a>:</p>
<blockquote><p>
    More specifically, the services were terminated for violation of the provision which states that &#8220;Member shall not interfere with another Member’s use and enjoyment of the Service or another entity’s use and enjoyment of similar services.&#8221;
</p></blockquote>
<p>So supposedly there was an attack on their DNS servers and they interpreted this as wikileaks doing harm to others?  Is this the future of how we handle attacks against single domain names? Would the same happen if it was the site of a chinese dissident or a Poker playing site or any other customer?</p>
<p>As things stand this puts me off these two companies and brings me again to the thought that <strong>we need an internet that is as independent from any single company or any single country as possible </strong>- it&#8217;s in the best interest for all of us in the long run. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=281&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2010/12/03/who-needs-censorship-if-you-have-amazon-and-everydns/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Ring of Python talk at pycon</title>
		<link>http://tetamap.wordpress.com/2010/02/19/ring-of-python-talk-at-pycon/</link>
		<comments>http://tetamap.wordpress.com/2010/02/19/ring-of-python-talk-at-pycon/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 23:06:18 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=274</guid>
		<description><![CDATA[Just did my talk on Ring of Python talk at Pycon US 2010, discussing competition and features of Python interpreters and co-operation issues around the most important issue in my oppinion: deployment. Also showcased execnet as a generic Python2Python bridge, connecting Python2.4, Python 3.1, Jython and IronPython. Got some nice feedback, also about the presentation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=274&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just did my talk on Ring of Python talk at Pycon US 2010, discussing competition and features of Python interpreters and co-operation issues around the most important issue in my oppinion: deployment.  Also showcased <a href="http://codespeak.net/execnet">execnet</a> as a generic Python2Python bridge, connecting Python2.4, Python 3.1, Jython and IronPython.  Got some nice feedback, also about the presentation style, actually i was using Prezi. You may go to the following page, click into the flash app and hit &#8220;cursor right&#8221;:  <a href="http://prezi.com/ri943hzpq_v_/ring-of-python/">Ring of Python </a>.  </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=274&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2010/02/19/ring-of-python-talk-at-pycon/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Elastic Python deployment networks</title>
		<link>http://tetamap.wordpress.com/2009/09/26/elastic-python-deployment-networks/</link>
		<comments>http://tetamap.wordpress.com/2009/09/26/elastic-python-deployment-networks/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 21:29:34 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[execnet]]></category>
		<category><![CDATA[networks]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=243</guid>
		<description><![CDATA[Time for a bit of fiction on distributed Python deployment. As some of you know, py.execnet imperatively and elastically executes code in local or remote python processes, maintaining channels for exchanging data. Execnet has the wonderful zero-install feature which means no software except a Python interpreter is required remotely. The connection between Python interpreters is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=243&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Time for a bit of fiction on distributed Python deployment.  As some of you know, <a class="reference external" href="http://pylib.org/execnet.html">py.execnet</a> imperatively and elastically executes code in local or remote python processes, maintaining channels for exchanging data.  Execnet has the wonderful <strong>zero-install</strong> feature which means no software except a Python interpreter is required remotely.  The connection between Python interpreters is direct, i.e. the connecting side needs to know how to start the remote side.  And it&#8217;s non-transitive meaning: given a <tt class="docutils literal"><span class="pre">A-&gt;B</span></tt> and a <tt class="docutils literal"><span class="pre">B-&gt;C</span></tt> connection there is no support for getting a <tt class="docutils literal"><span class="pre">A-&gt;C</span></tt> connection mediated by B.</p>
<p>I&#8217;d like to lift these restriction and introduce the concept of a <strong>deployment network</strong> through which execnet connections can be mediated.  I am pondering a command line tool that creates a network of Python intepreters on multiple hosts like this:</p>
<p><pre class="brush: bash;">
execnet start mynet ssh=linuxbox.org socket=windowsbox.com ssh=osx.com

</pre>
<p>This would create a &quot;mynet&quot; deployment network of four Python interpreters running on different hosts and platforms: one local process and three remote processes connected to it.  Let&#8217;s add a remote Jython process to the &quot;mynet&quot; deployment network:</p>
<p><pre class="brush: bash;">
execnet addhost mynet ssh=remote//python=jython
</pre>
<p>We can generally use the &#8216;mynet&#8217; handle to work with this newly instantiated deployment network.  For example, to get a fresh process on a certain platform from a Python program:</p>
<p><pre class="brush: python;">
mynet = execnet.connect('mynet')
gateway = mynet.makegateway(platform=&quot;java&quot;)
</pre>
<p>The first line connects to our local &#8216;mynet&#8217; process. The second line creates a gateway to a fresh Python interpreter, in this case a <a class="reference external" href="http://www.jython.org">Jython</a> process.  The bootstrapping of the Jython-side gateway object is determined by the initiating client side.  The two subprocesses communicate through an IO-connection that is mediated by the &#8216;mynet&#8217; deployment network.</p>
<p>This is very exciting because the <strong>zero-installation feature is preserved on two levels</strong>: the deployment processes work on software coming from a single point, the command line above.  And our &quot;on-top&quot; gateways operate with software determined from the initiating side, from the python code above.  Interaction between the two worlds is limited to a connect operation and providing IO mediatiation.  This means the deployment network facilities can evolve independently from the &quot;on-top&quot; execnet-elastic programs.</p>
<p>Conceptually it&#8217;s a very reliable and robust setting.  The <tt class="docutils literal"><span class="pre">mynet</span></tt> processes should be able to run as robustly as unix shells. They are to provide a solid base for writing and deploying Python applications that span multiple interpreters.  They don&#8217;t run applications in-process. </p>
<p>This is not all fiction. The current development version of <a class="reference external" href="http://pylib.org/execnet.html">py.execnet</a> already works across and between CPython2.4 through to CPython 3.1, Jython and PyPy.  And i intend to release execnet as a separate package soon, providing the basis for implementing the above fiction and lots of other on-top fun <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=243&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2009/09/26/elastic-python-deployment-networks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Let&#8217;s prevent a no-privacy world by better technology!</title>
		<link>http://tetamap.wordpress.com/2009/08/15/lets-prevent-a-no-privacy-world-by-better-technology/</link>
		<comments>http://tetamap.wordpress.com/2009/08/15/lets-prevent-a-no-privacy-world-by-better-technology/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 13:40:32 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[clouds]]></category>
		<category><![CDATA[mass surveillance]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[user-controlled]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=238</guid>
		<description><![CDATA[Dear Google, Amazon and web 2.0: you are doing a great job of providing cool services and apps, you are doing away with obnoxious installation and upgrade steps, your stuff often works out of the box and you offer convenient interfaces. Great. Comes with a caveat, though: the loss of control of my data and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=238&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear Google, Amazon and web 2.0: you are doing a great job of providing cool services and apps, you are doing away with obnoxious installation and upgrade steps, your stuff often works out of the box and you offer convenient interfaces.  Great.</p>
<p>Comes with a caveat, though: the loss of control of my data and my communication, loss of ability to install and run whichever programs <em>I</em> like.   You as central organisations and your ruling governments develop the practical possibility to get at all this data, on a mass basis and retro-actively. Something needs to change about this or we all will be ending in a world with <em>historically unprecedented power structures</em> in the hand of few.  A world with virtually no privacy.</p>
<p>Part of what i can do is thinking about cool new technology to counter these developments.  I am convinced we need a more decentral application execution infrastructure.  We need open cloud software and infrastructure that allows to have easy-to-develop apps run &quot;on the net&quot; &#8211; a wealthy network of PCs and mobile phones.  A free wireless-type network, not expensive mobile &quot;total control&quot; networks.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/238/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=238&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2009/08/15/lets-prevent-a-no-privacy-world-by-better-technology/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>pylib 1.0.0 released: the testing-with-python innovations continue</title>
		<link>http://tetamap.wordpress.com/2009/08/04/pylib-1-0-0-released-the-testing-with-python-innovations-continue/</link>
		<comments>http://tetamap.wordpress.com/2009/08/04/pylib-1-0-0-released-the-testing-with-python-innovations-continue/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 10:05:29 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=224</guid>
		<description><![CDATA[Took a few betas but finally i uploaded a 1.0.0 py lib release, featuring the mature and powerful py.test tool and &#34;execnet-style&#34; elastic distributed programming. With the new release, there are many new advanced automated testing features &#8211; here is a quick summary: funcargs &#8211; pythonic zero-boilerplate fixtures for Python test functions : totally separates [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=224&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Took a few betas but finally i uploaded a <a class="reference external" href="http://pypi.python.org/pypi/py">1.0.0 py lib release</a>, featuring the mature and powerful py.test tool and &quot;execnet-style&quot; <em>elastic</em> distributed programming.  With the new release, there are many new advanced automated testing features &#8211; here is a quick summary:</p>
<ul class="simple">
<li><a class="reference external" href="http://codespeak.net/py/dist/test/funcargs.html">funcargs</a> &#8211; pythonic zero-boilerplate fixtures for Python test functions :
<ul>
<li>totally separates test code, test configuration and test setup</li>
<li>ideal for integration and functional tests</li>
<li>allows for flexible and natural test parametrization schemes</li>
</ul>
</li>
<li>new <a class="reference external" href="http://codespeak.net/py/dist/test/extend.html">plugin architecture</a>, allowing easy-to-write project-specific and cross-project single-file plugins.   The most notable new external plugin is <a class="reference external" href="http://codespeak.net/py/dist/test/plugin/oejskit.html">oejskit</a> which naturally enables <strong>running and reporting of javascript-unittests in real-life browsers</strong>.</li>
<li>many new features done in easy-to-improve <a class="reference external" href="http://codespeak.net/py/dist/test/plugin/index.html">default plugins</a>, highlights:
<ul>
<li>xfail: mark tests as &quot;expected to fail&quot; and report separately.</li>
<li>pastebin: automatically send tracebacks to pocoo paste service</li>
<li>capture: flexibly capture stdout/stderr of subprocesses, per-test &#8230;</li>
<li>monkeypatch: safely monkeypatch modules/classes from within tests</li>
<li>unittest: run and integrate traditional unittest.py tests</li>
<li>figleaf: generate html coverage reports with the figleaf module</li>
<li>resultlog: generate buildbot-friendly reporting output</li>
<li>&#8230;</li>
</ul>
</li>
<li><a class="reference external" href="http://codespeak.net/py/dist/test/dist.html">distributed testing</a> and <a class="reference external" href="http://codespeak.net/py/dist/execnet.html">elastic distributed execution</a>:
<ul>
<li>new unified &quot;TX&quot; URL scheme for specifying remote processes</li>
<li>new distribution modes &quot;&#8211;dist=each&quot; and &quot;&#8211;dist=load&quot;</li>
<li>new sync/async ways to handle 1:N communication</li>
<li>improved documentation</li>
</ul>
</li>
</ul>
<p>The py lib continues to offer most of the functionality used by the testing tool in <a class="reference external" href="http://pylib.org">independent namespaces</a>.</p>
<p>Some non-test related code, notably greenlets/co-routines and api-generation now live as their own projects which simplifies the installation procedure because no C-Extensions are required anymore.</p>
<p>The whole package should work well with Linux, Win32 and OSX, on Python 2.3, 2.4, 2.5 and 2.6.  (Expect Python3 compatibility soon!)</p>
<p>For more info, see the py.test and py lib documentation:</p>
<blockquote>
<p><a class="reference external" href="http://pytest.org">http://pytest.org</a></p>
<p><a class="reference external" href="http://pylib.org">http://pylib.org</a></p>
</blockquote>
<p>have fun, holger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=224&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2009/08/04/pylib-1-0-0-released-the-testing-with-python-innovations-continue/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>code-centered issue tracking?</title>
		<link>http://tetamap.wordpress.com/2009/05/18/code-centered-issue-tracking/</link>
		<comments>http://tetamap.wordpress.com/2009/05/18/code-centered-issue-tracking/#comments</comments>
		<pubDate>Mon, 18 May 2009 11:35:25 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=217</guid>
		<description><![CDATA[Is there anything that allows code-centered issue tracking? Recently, Gustavo Niemeyer had an interesting piece up where he suggests private/protected syntax for Python. His point is that code collaboration doesn&#8217;t otherwise work in larger uncontrolled environments of dev groups. I agree with most of his observations but not his conclusion. I&#8217;d rather like to see [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=217&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Is there anything that allows code-centered issue tracking? Recently, Gustavo Niemeyer had an <a class="reference external" href="http://blog.labix.org/2009/05/15/class-member-access-control-enforcement-vs-convention">interesting piece up</a> where he suggests private/protected syntax for Python.  His point is that code collaboration doesn&#8217;t otherwise work in larger uncontrolled environments of dev groups.  I agree with most of his observations but not his conclusion.  I&#8217;d rather like to see reduced communication costs for changing code.  Here is an example of what i mean. If see a code fragment like this:</p>
<p><pre class="brush: python;">

def somefunc(self, x, y, z):
    self._cache = func(x) + other(y)
    self.z = self._cache + third(z)

</pre>
<p>i want to be able to visually mark this code, write a comment like:</p>
<blockquote><p>
<em>hey, i need the third(z) value, and doing self.z-self._cache feels bad &#8211; can you help?</em></p></blockquote>
<p>and i want my development environment to automatically route this question with exact code refs to the maintainers of the code. This should not take longer than 20 seconds and be automatically managed.</p>
<p>On the receiving side, as the maintainer, i want to get notified and be able to say:</p>
<p><pre class="brush: bash;">
getissues mypkg/subpkg
</pre>
<p>and have it automatically list me all files and issues for it. So i easily see the above question, do a patch, and issue:</p>
<p><pre class="brush: bash;">
sendpatch PATCHNAME
</pre>
<p>and type in a message.  Maybe automatically CCed to other library maintainers, a mailing list etc.  As the original sender i get back a mail and can use a cmdline tool to apply the patch, give feedback and so forth &#8230;</p>
<p>IOW, i want to have tools that automatically manage the issue-addressing, code-referencing, finding-out about package info/release numbers, format the comment related to the cited code, send the mail, register an issue automatically and so on.  Is there something like this?</p>
<p>If not: doesn&#8217;t we already have most of the pieces?  What makes sense to use for it?  Mercurial and Patch queues?  Maybe the new Bitbucket API? Integrate with existing issue tracker?  First goal would be to have it manage itself, i guess <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>cheers, holger</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=217&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2009/05/18/code-centered-issue-tracking/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Putting test-hooks into local and global plugins</title>
		<link>http://tetamap.wordpress.com/2009/05/14/putting-test-hooks-into-local-and-global-plugins/</link>
		<comments>http://tetamap.wordpress.com/2009/05/14/putting-test-hooks-into-local-and-global-plugins/#comments</comments>
		<pubDate>Thu, 14 May 2009 12:01:18 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=195</guid>
		<description><![CDATA[(updated to match 1.0 API and features) I&#8217;d like to clarify py.test&#8217;s hook lookup and showcase the ease of writing things into per-project or global plugins. The pytest_generate_tests was discussed in the last blog post on parametrizing tests. Here is where you can write this hook down: in the test module in a local plugin [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=195&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>(<i>updated to match 1.0 API and features</i>) I&#8217;d like to clarify py.test&#8217;s hook lookup and showcase the ease of writing things into per-project or global plugins.  The <tt class="docutils literal"><span class="pre">pytest_generate_tests</span></tt> was discussed in the <a class="reference external" href="http://tetamap.wordpress.com/2009/05/13/parametrizing">last blog post on parametrizing tests</a>.  Here is where you can write this hook down:</p>
<blockquote>
<ul class="simple">
<li>in the test module</li>
<li>in a local plugin</li>
<li>or in a global plugin</li>
</ul>
</blockquote>
<p>The last blog post showed  how to put the hook directly into the test module.  Let&#8217;s take a look now what putting a hook into a &quot;local or global plugin&quot; means.</p>
<div class="section" id="putting-a-hook-in-a-local-plugin">
<h1>Putting a Hook in a local plugin</h1>
<p>Putting the generate-hook into a local plugin means to create a <tt class="docutils literal"><span class="pre">conftest.py</span></tt> file in your test directory or package root directory with these contents: </p>
<p><pre class="brush: python;">

#./conftest.py
def pytest_generate_tests(metafunc):
     # exactly same implementation as module-level one
</pre>
<p>As with test files and functions and arguments, <tt class="docutils literal"><span class="pre">conftest.py</span></tt> files and the exact name <tt class="docutils literal"><span class="pre">ConftestPlugin</span></tt> will be automatically discovered and the plugin be instantiated.</p>
</div>
<div class="section" id="put-hook-into-a-global-plugin">
<h1>Put hook into a global plugin</h1>
<p>Putting the generate-hook in a global cross-project plugin requires to invent a file or package name with a fixed  <tt class="docutils literal"><span class="pre">pytest_</span></tt> prefix.  Here is how you would write down the generate hook into a self-contained <tt class="docutils literal"><span class="pre">pytest_mygen.py</span></tt> file:</p>
<p><pre class="brush: python;">
#./pytest_mygen.py

def pytest_generate_tests(metafunc):
      # exactly same implementation as module-level one

</pre>
<p>The hook name including its <tt class="docutils literal"><span class="pre">metafunc</span></tt> argument needs to be used exactly as decribed &#8211; loading your plugin will otherwise result in an error. </p>
</div>
<div class="section" id="activating-a-global-plugin">
<h1>Activating a global plugin</h1>
<p>While local plugins are automatically discovered, global plugins need to specified.  To activate a global plugin <tt class="docutils literal"><span class="pre">pytest_mygen</span></tt> you can use either of the following three ways:</p>
<p><pre class="brush: python;">
py.test -p mygen             # for command line activation

export PYTEST_PLUGINS=mygen  # for shell/env activation

pytest_plugins = &quot;mygen&quot;     # in a test module or conftest.py
</pre>
<p>py.test loads command-line or environment-specified plugins very early so that plugins can add command line options.</p>
</div>
<div class="section" id="multiple-pytest-generate-hook-implementations">
<h1>multiple pytest_generate_hook implementations</h1>
<p>All existing <tt class="docutils literal"><span class="pre">pytests_generate_hooks</span></tt> hooks will be called once for each test function.  You can have multiple hooks but the generate-hook usually only acts on a specific funcarg by doing a check like this:</p>
<p><pre class="brush: python;">
if &quot;myarg&quot; in metafunc.funcargnames:
    ...
</pre>
<p>So, you say, what about a test function with multiple arguments &#8211; could each function argument come from a different generating provider factory?</p>
<p>This would mean that multiple generators act independently but want to collaborate and combine their values for a given test functions.  Well, if you encounter a real need for it, please come forward and we&#8217;ll think up a fitting API extension.  A couple of days ago i had a &quot;combining funcargs&quot; API call implemented but decided to remove it because i try hard these days to only add features that have a proven need.</p>
</div>
<div class="section" id="concluding-note-on-putting-hooks-into-plugins">
<h1>Putting test support code into plugins FTW</h1>
<p>Lastly, let me point out that putting the <tt class="docutils literal"><span class="pre">pytest_generate_tests</span></tt> hook into a plugin allows the actual test code to stay igorant about the exact way how or where parametrization is implemented.   For example, adding command line options for influencing the generation or selection of parameter sets, including randomizing, would not change a single character in the test module and test code.</p>
<p>have fun and let me know what you think, holger</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=195&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2009/05/14/putting-test-hooks-into-local-and-global-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
		<item>
		<title>Parametrizing Python tests, generalized.</title>
		<link>http://tetamap.wordpress.com/2009/05/13/parametrizing-python-tests-generalized/</link>
		<comments>http://tetamap.wordpress.com/2009/05/13/parametrizing-python-tests-generalized/#comments</comments>
		<pubDate>Wed, 13 May 2009 14:55:06 +0000</pubDate>
		<dc:creator>holger krekel</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://tetamap.wordpress.com/?p=164</guid>
		<description><![CDATA[Parametrizing test runs is a kind of a hot topic with Python test tools. py.test recently grew a new pytest_generate_tests hook to parametrize tests. I am going to introduce it by providing ports of Michael Foord&#8216;s recent experiments with parametrizing unittest.py test cases and an example from Rob Collins testscenarios unittest extension. The gist of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=164&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Parametrizing test runs is a kind of a <a class="reference external" href="http://lists.idyll.org/pipermail/testing-in-python/2009-April/thread.html#1843">hot topic</a> with Python test tools. <a class="reference external" href="http://codespeak.net/py/trunk/test/test.html">py.test</a> recently grew a new <tt class="docutils literal"><span class="pre">pytest_generate_tests</span></tt> hook to parametrize tests. I am going to introduce it by providing ports of <a class="reference external" href="http://www.voidspace.org.uk/python/weblog/index.shtml">Michael Foord</a>&#8216;s recent experiments with <a class="reference external" href="http://code.google.com/p/unittest-ext/source/browse/trunk/params.py">parametrizing unittest.py test cases</a> and an example from Rob Collins <a class="reference external" href="https://launchpad.net/testscenarios">testscenarios</a> unittest extension.   The gist of the new hook is that it allows to easily implement and combine these schemes.  It builds on the general idea of allowing python test functions to receive function arguments (&quot;funcargs&quot;) &#8211; and defining mechanisms on how to provide them.</p>
<div class="section" id="the-parametrizer-example-ported">
<h2>The parametrizer example, ported</h2>
<p>The idea of <a class="reference external" href="http://www.voidspace.org.uk/python/weblog/index.shtml">Michael Foord</a>&#8216;s <a class="reference external" href="http://code.google.com/p/unittest-ext/source/browse/trunk/params.py">Parametrizer</a> example is to define multiple sets of parameters and have specified test functions receive those arguments. Here is a direct port of Michael&#8217;s example to use py.test&#8217;s new hook:</p>
<p><pre class="brush: python;">
#./test_parametrize.py
import py

def pytest_generate_tests(metafunc):
    # called once per each test function
    for funcargs in metafunc.cls.params[metafunc.function.__name__]:
        # schedule a new test function run with applied **funcargs
        metafunc.addcall(funcargs=funcargs)

class TestClass:
    params = {
        'test_equals': [dict(a=1, b=2), dict(a=3, b=3), dict(a=5, b=4)],
        'test_zerodivision': [dict(a=1, b=0), dict(a=3, b=2)],
    }

    def test_equals(self, a, b):
        assert a == b

    def test_zerodivision(self, a, b):
        py.test.raises(ZeroDivisionError, &quot;a/b&quot;)

</pre>
<p>py.test automatically discovers both the <tt class="docutils literal"><span class="pre">pytest_generate_tests</span></tt> hook and the two test functions.  For each test function it calls the hook, passing it a <a class="reference external" href="http://codespeak.net/py/trunk/test/funcargs.html#metafunc-object">metafunc object</a> which provides meta information about the test function and allows to add new tests during collection. Let&#8217;s see what just collecting the tests produces:</p>
<p><pre class="brush: python;">
$ py.test --collectonly test_parametrize.py

&lt;Module 'test_parametrize.py'&gt;
  &lt;Class 'TestClass'&gt;
    &lt;Instance '()'&gt;
      &lt;FunctionCollector 'test_equals'&gt;
        &lt;Function 'test_equals[0]'&gt;
        &lt;Function 'test_equals[1]'&gt;
        &lt;Function 'test_equals[2]'&gt;
      &lt;FunctionCollector 'test_zerodivision'&gt;
        &lt;Function 'test_zerodivision[0]'&gt;
        &lt;Function 'test_zerodivision[1]'&gt;

</pre>
<p>So we collected 5 actual runs of test functions. Let now run the test functions:</p>
<p><pre class="brush: python;">
$ py.test test_parametrize.py

========================= test session starts =========================
python: platform linux2 -- Python 2.6.2
test object 1: test_parametrize.py

test_parametrize.py F.F.F

============================== FAILURES ===============================
________________ TestClass.test_equals.test_equals[0] _________________

self = &lt;test_parametrize.TestClass instance at 0x994f8ac&gt;, a = 1, b = 2

    def test_equals(self, a, b):
&gt;       assert a == b
E       assert 1 == 2

test_parametrize.py:14: AssertionError
________________ TestClass.test_equals.test_equals[2] _________________

self = &lt;test_parametrize.TestClass instance at 0x994f8ac&gt;, a = 5, b = 4

    def test_equals(self, a, b):
&gt;       assert a == b
E       assert 5 == 4

test_parametrize.py:14: AssertionError
__________ TestClass.test_zerodivision.test_zerodivision[1] ___________

self = &lt;test_parametrize.TestClass instance at 0x994f8ac&gt;, a = 3, b = 2

    def test_zerodivision(self, a, b):
&gt;       py.test.raises(ZeroDivisionError, &quot;a/b&quot;)
E       ExceptionFailure: 'DID NOT RAISE'

test_parametrize.py:17: ExceptionFailure
================= 3 failed, 2 passed in 0.13 seconds =================

</pre>
<p>You can easily see the failing tests and the parameters that the tests received. It also showcases py.test traceback reporting but that&#8217;s for another discussion.</p>
</div>
<div class="section" id="the-parametrizer-example-decorated">
<h2>The parametrizer example, decorated</h2>
<p>So, you say, what about having a decorator specifying test parameters? Here is the same example, letting our hook implement a decorator scheme:</p>
<p><pre class="brush: python;">
#./test_parametrize2.py

import py

def params(funcarglist):
    def wrapper(function):
        function.funcarglist = funcarglist
        return function
    return wrapper

def pytest_generate_tests(metafunc):
    for funcargs in getattr(metafunc.function, 'funcarglist', ()):
        metafunc.addcall(funcargs=funcargs)

# actual test code, above support code can live elsewhere

class TestClass:
    @params([dict(a=1, b=2), dict(a=3, b=3), dict(a=5, b=4)], )
    def test_equals(self, a, b):
        assert a == b

    @params([dict(a=1, b=0), dict(a=3, b=2)])
    def test_zerodivision(self, a, b):
        py.test.raises(ZeroDivisionError, &quot;a/b&quot;)
</pre>
<p>This variant leaves the &quot;test specification&quot; tightly coupled. Running it with <tt class="docutils literal"><span class="pre">py.test</span> <span class="pre">test_parametrize2.py</span></tt> provides the some output as for the first example port.</p>
</div>
<div class="section" id="a-quick-port-of-testscenarios">
<h2>A quick port of &quot;testscenarios&quot;</h2>
<p>Finally, let&#8217;s also port Rob Collin&#8217;s <a class="reference external" href="http://bazaar.launchpad.net/~lifeless/testscenarios/trunk/annotate/head%3A/doc/example.py">testscenario example</a>. Here is the implementation of the full mechanism with py.test and the tests in funcarg-style:</p>
<p><pre class="brush: python;">
#./test_parametrize3.py

def pytest_generate_tests(metafunc):
    for scenario in metafunc.cls.scenarios:
        metafunc.addcall(id=scenario[0], funcargs=scenario[1])

scenario1 = ('basic', {'attribute': 'value'})
scenario2 = ('advanced', {'attribute': 'value2'})

class TestSampleWithScenarios:
    scenarios = [scenario1, scenario2]

    def test_demo(self, attribute):
        assert isinstance(attribute, str)

</pre>
<p>Let&#8217;s run it:</p>
<p><pre class="brush: python;">

$ py.test -v test_parametrize3.py

================================ test session starts ================================
python: platform linux2 -- Python 2.6.2 -- /usr/bin/python
test object 1: test_parametrize3.py

test_parametrize3.py:14: TestSampleWithScenarios.test_demo[basic] PASS
test_parametrize3.py:14: TestSampleWithScenarios.test_demo[advanced] PASS

============================= 2 passed in 0.06 seconds ==============================

</pre>
<p>Easy, isn&#8217;t it?</p>
</div>
<div class="section" id="playing-yourself">
<h2>Playing yourself</h2>
<p>If you want to play with the examples yourself, you can use <tt class="docutils literal"><span class="pre">hg</span> <span class="pre">clone</span> <span class="pre">https://bitbucket.org/hpk42/py-trunk/</span></tt> and <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">install</span></tt> it.  In the <tt class="docutils literal"><span class="pre">example/parametrize/</span></tt> direcrory you can tweak and run the test examples.  Let me know of comments or problems you may encounter.</p>
</div>
<div class="section" id="conclusion-deprecating-yield">
<h2>Conclusion: deprecating &quot;yield&quot;</h2>
<p>The three ports show that <tt class="docutils literal"><span class="pre">pytest_generate_tests</span></tt> is a hook that allows to implement many custom parametrization schemes.   You can implement the hook in a test module or in local or global plugin, sharing it in your project or in the community.  The hook also integrates well with other usages of funcargs, see the extensive <a class="reference external" href="http://codespeak.net/py/trunk/test/funcargs.html">pytest funcarg documentation</a>.</p>
<p>The new way to parametrize test is meant to substitute yield usage of test-functions aka &quot;generative tests&quot;, also used by nosetests. yield-style <a class="reference external" href="http://bruynooghe.blogspot.com/2008/09/generative-tests.html">Generative tests have received criticism</a> and despite being the one who invented them, i mostly agree and recommend not using them anymore.</p>
<p>I&#8217;d like to thank Samuele Pedroni and Ronny Pfannschmitt who helped to evolve the new hook and pushed me for implementing it.  Oh, and did i emphasize that working feedback-based and documentation driven is so much better than going wild on hypothetical usages?</p>
<p>have fun, holger</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tetamap.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tetamap.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tetamap.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tetamap.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tetamap.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tetamap.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tetamap.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tetamap.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tetamap.wordpress.com&amp;blog=6679328&amp;post=164&amp;subd=tetamap&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tetamap.wordpress.com/2009/05/13/parametrizing-python-tests-generalized/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1d40af73bd088f5f7b487b42b799881d?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">holger</media:title>
		</media:content>
	</item>
	</channel>
</rss>
