----- Forwarded message from holger krekel <hpk@...> -----
Date: Sat, 12 Feb 2005 23:33:13 +0100
From: hpk@... (holger krekel)
To: Oleg Broytmann <phd@...>
Mail-Followup-To: holger krekel <hpk@...>,
Oleg Broytmann <phd@...>, py-dev@...
Subject: Re: [py-dev] py.test and python 2.2
On Sat, Feb 12, 2005 at 22:36 +0300, Oleg Broytmann wrote:
> Hello! I'd like to add a minor patch - to use py.test with python 2.2
> you need to add "from __future__ import generators" to the beginning of
> the py/execnet/channel.py.
Thanks for hinting at this. Seo Sanghyeon actually also "fixed"
this at some point and i immediately reverted the patch.
The thing is that running 'py.test' on the py lib itself
with this patch generates failing tests :-)
The underlying problem is (or rather was) that the contents of
channel.py are used in two ways: once for just importing it
and once for making it a part of a larger source code, used
for "gateway" initialization. See
for some details about gateways. When you invoke something like
it is really handled by this mechanism which basically
allows to run tests on different machines as well.
You did use py.test like this, didn't you?
The good news is that I now got rid of the shallow 'yield'
usage in favour of an old-style __iter__ implementation. So
the problem should be gone since rev 9174.
----- End forwarded message -----